diff --git a/typo3/sysext/core/Documentation/Changelog/11.5.x/Important-98960-DefaultTypeDefinitionOfCustomContentTypes.rst b/typo3/sysext/core/Documentation/Changelog/11.5.x/Important-98960-DefaultTypeDefinitionOfCustomContentTypes.rst index e146be740f6e7c9e6f415abcb1ff48ad353027ee..814de880d0331163fce6d545a932bd2e2d4af577 100644 --- a/typo3/sysext/core/Documentation/Changelog/11.5.x/Important-98960-DefaultTypeDefinitionOfCustomContentTypes.rst +++ b/typo3/sysext/core/Documentation/Changelog/11.5.x/Important-98960-DefaultTypeDefinitionOfCustomContentTypes.rst @@ -13,7 +13,7 @@ Description 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 -:php:`\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin()` with +:php:`\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin()` with the 5th argument being set to :php:`\TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT` or TYPO3's native API :php:`\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin()` @@ -39,7 +39,8 @@ Example Example for a custom Extbase plugin with TYPO3's Core "felogin" extension in `EXT:felogin/Configuration/TCA/Overrides/tt_content.php`: -.. code-block:: php +.. code-block:: php + :caption: EXT:felogin/Configuration/TCA/Overrides/tt_content.php call_user_func(static function () { $contentTypeName = 'felogin_login'; @@ -67,4 +68,27 @@ in `EXT:felogin/Configuration/TCA/Overrides/tt_content.php`: ); }); +It is configured to be a content element with its own ctype by having the 5th +parameter set to :php:`ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT`. + +.. code-block:: php + :caption: EXT:felogin/ext_localconf.php + :emphasize-lines: 14 + + use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; + + ExtensionUtility::configurePlugin( + 'Felogin', + 'Login', + [ + LoginController::class => 'login, overview', + PasswordRecoveryController::class => 'recovery,showChangePassword,changePassword', + ], + [ + LoginController::class => 'login, overview', + PasswordRecoveryController::class => 'recovery,showChangePassword,changePassword', + ], + ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT + ); + .. index:: Backend, TCA, ext:core