Skip to content
Snippets Groups Projects
Commit d01a03b0 authored by linawolf's avatar linawolf Committed by Christian Kuhn
Browse files

[DOCS] Correct Changelog for ExtensionUtility::configurePlugin

The 5th parameter of ExtensionUtility::registerPlugin is thegroup and not `ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT`

Fixes the name to the correct function and adds example code.

Resolves: #101575
Releases: main, 12.4, 11.5
Change-Id: I05a344ee11aaa8a9b3187a11528e2e506f47756d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80355


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 7679a2ed
Branches
Tags
No related merge requests found
......@@ -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
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