extension_builder
extension_builder copied to clipboard
configurePlugin
Describe the bug The result seems not compatible with the proposal https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/4-FirstExtension/7-configuring-the-plugin.html
<?php
defined('TYPO3') || die();
(static function() {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Album',
'Showalbum',
[
\HGA\Album\Controller\AlbumController::class => 'list, show, new, create, edit, update'
],
// non-cacheable actions
[
\HGA\Album\Controller\AlbumController::class => 'create, update'
]
);
// wizards
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
showalbum {
iconIdentifier = album-plugin-showalbum
title = LLL:EXT:album/Resources/Private/Language/locallang_db.xlf:tx_album_showalbum.name
description = LLL:EXT:album/Resources/Private/Language/locallang_db.xlf:tx_album_showalbum.description
tt_content_defValues {
CType = list
list_type = album_showalbum
}
}
}
show = *
}
}'
);
})();
used static function instead of
call_user_func(
function ()
Also under Configuration→TCA→Overrides→tt_content.php→registerPlugin the part for the icon is missing.
TYPO3 Version V11.5.0 Extension Builder Version: V11 Master
the static is a tiny optimization and as long as you don't use $this, there is no difference. Using static function here is better than without.
Please create a separate issue about the plugin icon. Thank you!