andersundsehr / relation-processor
添加 DataProcessor 以解决所有类型的 TCA 关系
1.3.0
2024-07-01 11:05 UTC
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0
- typo3/cms-core: ^11.5 || ^12.0
- typo3/cms-frontend: ^11.5 || ^12.0
Requires (Dev)
- pluswerk/grumphp-config: ^6.9
- saschaegerer/phpstan-typo3: ^1.8.2
- ssch/typo3-rector: ^1.3.5
README
安装
composer req andersundsehr/relation-processor
它做了什么
它添加了一个 RelationProcessor,这样您就不必手动为每个要使用的关联定义一个 DatabaseQueryProcessor。
它使用 TCA 配置来确定正确的查询。
它使用 PageRepository->versionOL()
和 PageRepository->getLanguageOverlay()
函数,因此具有正确的版本化和语言覆盖支持。
示例
10 = AUS\RelationProcessor\DataProcessing\RelationProcessor 10 { # this field is of the current table and will be used to determine the relation # eg. if you have EXT:news and this processor is used on a tt_content you can get all related news like this: field = tx_news_related_news }
高级示例
page = PAGE page.10 = FLUIDTEMPLATE page.10 { dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = header_image as = headerImage } 20 = AUS\RelationProcessor\DataProcessing\RelationProcessor 20 { field = tx_customerproduct_companies dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = header_image as = headerImage } 20 = AUS\RelationProcessor\DataProcessing\RelationProcessor 20 { field = tx_customercompany_product_family dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = header_image as = headerImage } } } } } } }
来自 anders und sehr GmbH 的爱与热情
如果某件事没有工作 😮
或者您喜欢这个扩展 🥰,请告诉我们。