Important: #98960 - Default type definition of custom Content Types

See forge#98960


Due to the deprecation of Switchable Controller Actions for Extbase, it is recommended to use custom content types as plugins. When using Extbase's API \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin() with the 5th argument being set to \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT or TYPO3's native API \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin() with the second argument being set to CType, the entered icon identifier is now automatically added as typeicon_classes for the given CType and the TCA types definition (showitem) of the default header type is automatically applied, so extension authors do not need to add all default fields anymore.


These defaults are only applied if they are not set manually, so the changes are optional defaults.

In addition, the API method \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes() now also allows to add custom fields after a palette, so common variants such as the Plugin tab can be added after a specific palette.


Example for a custom Extbase plugin with TYPO3's Core "felogin" extension in EXT:felogin/Configuration/TCA/Overrides/tt_content.php:

call_user_func(static function () {
    $contentTypeName = 'felogin_login';

    // Add the FlexForm for the new content type

    // Add the FlexForm to the showitem list
        '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin, pi_flexform',