andersundsehr/relation-processor

添加 DataProcessor 以解决所有类型的 TCA 关系

安装次数: 2,194

依赖项: 0

建议者: 0

安全性: 0

星标: 2

关注者: 2

分支: 2

开放性问题: 0

类型:typo3-cms-extension

1.3.0 2024-07-01 11:05 UTC

This package is auto-updated.

Last update: 2024-08-31 11:28:56 UTC


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 的爱与热情

如果某件事没有工作 😮
或者您喜欢这个扩展 🥰,请告诉我们。

我们正在招聘 https://www.andersundsehr.com/karriere/