events/Configuration/TCA/Overrides/pages.php
Daniel Siepmann 81065f5c67
BREAKING: TYPO3 v12 support (#44)
* Migrated all fixtures to PHP.
* Removed version specific adjustments.
2023-11-27 10:04:42 +01:00

30 lines
816 B
PHP

<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
(static function (string $extensionKey, string $tableName) {
$languagePath = 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:' . $tableName;
ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
'ctrl' => [
'typeicon_classes' => [
'contains-events' => 'pages-module-events',
],
],
]);
ExtensionManagementUtility::addTcaSelectItem(
$tableName,
'module',
[
'label' => $languagePath . '.module.events',
'value' => 'events',
'icon' => 'pages-module-events',
]
);
})('events', 'pages');