mirror of
https://github.com/werkraum-media/watchlist.git
synced 2024-11-23 18:36:09 +01:00
Daniel Siepmann
521920542a
We broke the registerPlugin() call by using lower cased version (the extension key) instead of an UpperCamelCase version (the ExtensionName), as opposed to the configurePlugin() call. Both calls have to be in sync. This is now adjusted and removes the need for a workaround to call addTcaSelectItem().
52 lines
2.2 KiB
PHP
52 lines
2.2 KiB
PHP
<?php
|
|
|
|
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
|
|
|
defined('TYPO3') || die();
|
|
|
|
(static function (string $extKey, string $table, string $contentType) {
|
|
$languagePath = implode(':', [
|
|
'LLL',
|
|
'EXT',
|
|
$extKey . '/Resources/Private/Language/locallang.xlf',
|
|
$table . '.' . $contentType . '.',
|
|
]);
|
|
|
|
ExtensionUtility::registerPlugin(
|
|
'Watchlist',
|
|
'Watchlist',
|
|
$languagePath . 'title',
|
|
'EXT:' . $extKey . '/Resources/Public/Icons/Extension.svg'
|
|
);
|
|
|
|
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$table], [
|
|
'ctrl' => [
|
|
'typeicon_classes' => [
|
|
$contentType => 'content-bullets',
|
|
],
|
|
],
|
|
'types' => [
|
|
$contentType => [
|
|
'showitem' => implode(',', [
|
|
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general',
|
|
'--palette--;;general',
|
|
'--palette--;;headers',
|
|
'--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance',
|
|
'--palette--;;frames',
|
|
'--palette--;;appearanceLinks',
|
|
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language',
|
|
'--palette--;;language',
|
|
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access',
|
|
'--palette--;;hidden',
|
|
'--palette--;;access',
|
|
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories',
|
|
'--div--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.tabs.category',
|
|
'categories',
|
|
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes',
|
|
'rowDescription',
|
|
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended',
|
|
]),
|
|
],
|
|
],
|
|
]);
|
|
})('watchlist', 'tt_content', 'watchlist_watchlist');
|