Skip to content
Snippets Groups Projects
Commit 3da3e5e6 authored by Benni Mack's avatar Benni Mack
Browse files

[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: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 17b0786b
Showing
with 832 additions and 166 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment