Review main Merged

63889[FEATURE] Add grouping and sorting for TCA select items

Benni Mack CR +2 V +2 Hard +832 −166 updated 04/15/20, 15:44

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 13