[FEATURE] Add grouping and sorting for TCA select items
Due to the deprecation of "switchable controller actions", list_type items can now be grouped in FormEngine - as well as all other "select" fields defined in TCA. A new TCA option in TCA type=select is added, called "itemGroups". In addition, all "items" now have four parts (fourth being optional) 0 => label 1 => value 2 => icon 3 => groupID where the group belongs to an item group (defined explicitly) or taken from a --div-- element, which then turns into an optgroup. In order then to avoid the "itemProcFunc" of tt_content.list_type which is used to sort items, a "sortOrders" option is added to sort items (within a group, if grouping is enabled) by label or value. When registering a new plugin, the groupId can be added as well as an additional parameter, which falls back to the "default" group. A new method ExtensionManagementUtility::addTcaSelectItemGroup() allows to add item groups via API. When registering extbase Plugins or pibase plugins, it is possible to add a registered "group ID" to make use of this feature. Resolves: #91008 Resolves: #82352 Releases: master Change-Id: I8ad215b5cbc16f332e7c129d762fc020ade5ceeb Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63889 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Alexander Schnitzler <git@alexanderschnitzler.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Alexander Schnitzler <git@alexanderschnitzler.de> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php 10 additions, 6 deletions...nd/Classes/Form/FormDataProvider/AbstractItemProvider.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php 144 additions, 1 deletion.../backend/Classes/Form/FormDataProvider/TcaSelectItems.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php 163 additions, 25 deletions...d/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php
- typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php 64 additions, 1 deletion...ysext/core/Classes/Utility/ExtensionManagementUtility.php
- typo3/sysext/core/Configuration/TCA/pages.php 30 additions, 11 deletionstypo3/sysext/core/Configuration/TCA/pages.php
- typo3/sysext/core/Documentation/Changelog/master/Feature-91008-ItemGroupingForTCASelectItems.rst 150 additions, 0 deletions...og/master/Feature-91008-ItemGroupingForTCASelectItems.rst
- typo3/sysext/core/Documentation/Changelog/master/Feature-91008-ItemSortingForTCASelectItems.rst 58 additions, 0 deletions...log/master/Feature-91008-ItemSortingForTCASelectItems.rst
- typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php 117 additions, 1 deletion...ore/Tests/Unit/Utility/ExtensionManagementUtilityTest.php
- typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php 7 additions, 2 deletionstypo3/sysext/extbase/Classes/Utility/ExtensionUtility.php
- typo3/sysext/felogin/Configuration/TCA/Overrides/tt_content.php 14 additions, 42 deletions...sysext/felogin/Configuration/TCA/Overrides/tt_content.php
- typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php 2 additions, 1 deletiontypo3/sysext/form/Configuration/TCA/Overrides/tt_content.php
- typo3/sysext/frontend/Classes/Hooks/TableColumnHooks.php 0 additions, 47 deletionstypo3/sysext/frontend/Classes/Hooks/TableColumnHooks.php
- typo3/sysext/frontend/Configuration/TCA/tt_content.php 73 additions, 29 deletionstypo3/sysext/frontend/Configuration/TCA/tt_content.php
Please register or sign in to comment