[FEATURE] Reusable getCategoryFieldsForTable itemsProcFunc 68/24968/19
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Sat, 3 Dec 2016 17:52:06 +0000 (18:52 +0100)
committerJan Helke <typo3@helke.de>
Sat, 3 Dec 2016 18:13:25 +0000 (19:13 +0100)
commit36f8765aa340c364f7b7edfa967549c683f21747
treef30c198edabd69ba784581dc8d3897e77f611958
parent2cbe770599cf27a8a623d2e4768d4b9f9971d113
[FEATURE] Reusable getCategoryFieldsForTable itemsProcFunc

Allow the the method CategoryRegistry->getCategoryFieldItems()
to be used as itemsProcFunc for select fields in the TCA in
arbitary contexts by introducing a new categoryFieldsTable
configuration in the config section of a column in the TCA.

This configuration key can either consist of a single string containing
the name of the table or a configuration array to define additional
conditions that need to be true so that a configured table is used.

The condition matching is based on the displayCond functionality of
the TCA. To make use of the existing functionality the code for
matching the display conditions is extracted from the form data
provider to a new DisplayConditionEvaluator utility class.

Resolves: #53045
Releases: master
Change-Id: I128cbeb6747a8f83e68cdaaaafbc3ab5901353d4
Reviewed-on: https://review.typo3.org/24968
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/backend/Classes/Form/FormDataProvider/EvaluateDisplayConditions.php
typo3/sysext/backend/Classes/Form/Utility/DisplayConditionEvaluator.php [new file with mode: 0644]
typo3/sysext/core/Classes/Category/CategoryRegistry.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-53045-GetCategoryFieldsForTableMethodRemovedFromCategoryRegistry.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Feature-53045-CategorizedFieldsForTableItemsProcFuncInCategoryRegistry.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Category/CategoryRegistryTest.php
typo3/sysext/frontend/Configuration/TCA/tt_content.php