mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-24 04:56:13 +01:00
tea/Configuration/TCA/Overrides/tt_content.php

42 lines
1.6 KiB
PHP
Raw Normal View History

<?php
2024-05-07 19:15:51 +02:00
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
defined('TYPO3') || die();
call_user_func(
static function (): void {
// This makes the plugin selectable in the BE.
2024-05-07 19:15:51 +02:00
ExtensionUtility::registerPlugin(
// extension name, matching the PHP namespaces (but without the vendor)
'Tea',
// arbitrary, but unique plugin name (not visible in the BE)
'TeaIndex',
// plugin title, as visible in the drop-down in the BE
'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_index',
// the icon visible in the drop-down in the BE
'EXT:tea/Resources/Public/Icons/Extension.svg'
);
2024-05-07 19:15:51 +02:00
ExtensionUtility::registerPlugin(
'Tea',
'TeaShow',
'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_show',
'EXT:tea/Resources/Public/Icons/Extension.svg'
);
2024-05-07 19:15:51 +02:00
ExtensionUtility::registerPlugin(
'Tea',
'TeaFrontEndEditor',
'LLL:EXT:tea/Resources/Private/Language/locallang.xlf:plugin.tea_frontend_editor',
'EXT:tea/Resources/Public/Icons/Extension.svg'
);
// This removes the default controls from the plugin.
$controlsToRemove = 'recursive,pages';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teaindex'] = $controlsToRemove;
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teashow'] = $controlsToRemove;
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teafrontendeditor'] = $controlsToRemove;
}
);