events/Configuration/TCA/Overrides/tt_content.php

71 lines
2.2 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
2021-12-13 09:09:13 +01:00
(function (string $extKey, string $table) {
$GLOBALS['TCA']['tt_content']['columns']['CType']['config']['itemGroups'][$extKey] = 'Events';
2019-11-11 12:43:50 +01:00
/* Search Plugin */
$pluginSignature = ExtensionUtility::registerPlugin(
'Events',
2019-11-11 12:43:50 +01:00
'DateSearch',
2019-11-13 10:46:21 +01:00
'Events: Date Search',
'events-plugin',
$extKey
2019-11-11 12:43:50 +01:00
);
ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader');
ExtensionManagementUtility::addPiFlexFormValue(
'*',
'FILE:EXT:events/Configuration/FlexForms/DateSearch.xml',
$pluginSignature,
2019-11-11 12:43:50 +01:00
);
/* Date List Plugin */
$pluginSignature = ExtensionUtility::registerPlugin(
'Events',
2019-11-11 12:43:50 +01:00
'DateList',
2019-11-13 10:46:21 +01:00
'Events: Date List',
'events-plugin',
$extKey
2019-11-11 12:43:50 +01:00
);
ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader');
ExtensionManagementUtility::addPiFlexFormValue(
'*',
'FILE:EXT:events/Configuration/FlexForms/DateList.xml',
$pluginSignature,
2019-11-11 12:43:50 +01:00
);
2019-11-13 10:46:21 +01:00
/* Date Show Plugin */
$pluginSignature = ExtensionUtility::registerPlugin(
'Events',
2019-11-13 10:46:21 +01:00
'DateShow',
'Events: Date Show',
'events-plugin',
$extKey
2019-11-13 10:46:21 +01:00
);
ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader');
ExtensionManagementUtility::addPiFlexFormValue(
'*',
'FILE:EXT:events/Configuration/FlexForms/DateShow.xml',
2019-11-13 10:46:21 +01:00
'events_dateshow',
);
/* Event Selected Plugin */
$pluginSignature = ExtensionUtility::registerPlugin(
'Events',
'Selected',
'Events: Show selected',
'events-plugin',
$extKey
);
ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader');
ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:events/Configuration/FlexForms/Selected.xml',
'events_selected',
);
2021-12-13 09:09:13 +01:00
})('events', 'tt_content');