Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C CMS
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • typo3typo3
  • CI
  • CMS
  • Repository
Switch branch/tag
  • cms
  • typo3
  • sysext
  • core
  • Classes
  • Utility
  • ExtensionManagementUtility.php
Find file BlameHistoryPermalink
  • Benni Mack's avatar
    [FEATURE] Add grouping and sorting for TCA select items · 3da3e5e6
    Benni Mack authored Mar 24, 2020
    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: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
    Tested-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
    Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
    Reviewed-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
    Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    3da3e5e6