From 5f0588565fc5b297b74be8ec75af1845f18ce40e Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 4 Nov 2024 11:50:14 +0100 Subject: [PATCH] Add provided (deprecated) CEs in content element wizard in v12 To streamline experience with v13 where they are added out of the box. Resolves: #11485 --- Configuration/TCA/Overrides/tt_content.php | 14 +++++-- .../Mod/Wizards/NewContentElement.tsconfig | 38 +++++++++++++++++++ Configuration/page.tsconfig | 1 + Documentation/Changelog/5.0.0.rst | 3 +- Documentation/Maintenance.rst | 4 ++ 5 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig create mode 100644 Configuration/page.tsconfig diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 08a854a..f22ec9a 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -6,12 +6,15 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Extbase\Utility\ExtensionUtility; (function (string $extKey, string $table) { + $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['itemGroups'][$extKey] = 'Events'; + /* Search Plugin */ $pluginSignature = ExtensionUtility::registerPlugin( 'Events', 'DateSearch', 'Events: Date Search', - 'events-plugin' + 'events-plugin', + $extKey ); ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader'); ExtensionManagementUtility::addPiFlexFormValue( @@ -25,7 +28,8 @@ use TYPO3\CMS\Extbase\Utility\ExtensionUtility; 'Events', 'DateList', 'Events: Date List', - 'events-plugin' + 'events-plugin', + $extKey ); ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader'); ExtensionManagementUtility::addPiFlexFormValue( @@ -39,7 +43,8 @@ use TYPO3\CMS\Extbase\Utility\ExtensionUtility; 'Events', 'DateShow', 'Events: Date Show', - 'events-plugin' + 'events-plugin', + $extKey ); ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader'); ExtensionManagementUtility::addPiFlexFormValue( @@ -53,7 +58,8 @@ use TYPO3\CMS\Extbase\Utility\ExtensionUtility; 'Events', 'Selected', 'Events: Show selected', - 'events-plugin' + 'events-plugin', + $extKey ); ExtensionManagementUtility::addToAllTCAtypes($table, 'pi_flexform', $pluginSignature, 'after:subheader'); ExtensionManagementUtility::addPiFlexFormValue( diff --git a/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig b/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig new file mode 100644 index 0000000..bd3f5c7 --- /dev/null +++ b/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig @@ -0,0 +1,38 @@ +mod.wizards { + newContentElement.wizardItems { + events { + header = Events + show = * + elements { + events_datesearch { + iconIdentifier = events-plugin + title = Events: Date Search + tt_content_defValues { + CType = events_datesearch + } + } + events_datelist { + iconIdentifier = events-plugin + title = Events: Date List + tt_content_defValues { + CType = events_datelist + } + } + events_dateshow { + iconIdentifier = events-plugin + title = Events: Date Show + tt_content_defValues { + CType = events_dateshow + } + } + events_selected { + iconIdentifier = events-plugin + title = Events: Show selected + tt_content_defValues { + CType = events_selected + } + } + } + } + } +} diff --git a/Configuration/page.tsconfig b/Configuration/page.tsconfig new file mode 100644 index 0000000..5bc2e00 --- /dev/null +++ b/Configuration/page.tsconfig @@ -0,0 +1 @@ +@import 'EXT:events/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig' diff --git a/Documentation/Changelog/5.0.0.rst b/Documentation/Changelog/5.0.0.rst index 961363b..d125983 100644 --- a/Documentation/Changelog/5.0.0.rst +++ b/Documentation/Changelog/5.0.0.rst @@ -32,4 +32,5 @@ Nothing Deprecation ----------- -Nothing +* The existing content elements are deprecated. + We recommend to build your own dedicated content elements. diff --git a/Documentation/Maintenance.rst b/Documentation/Maintenance.rst index 66b4621..9e55292 100644 --- a/Documentation/Maintenance.rst +++ b/Documentation/Maintenance.rst @@ -13,4 +13,8 @@ corresponding settings. That way the import can provide all the necessary information and can be passed down to all classes. +Remove no longer needed TSConfig +-------------------------------- +We currently have `Configuration/page.tsconfig` and `Configuration/TsConfig/`. +Both can be removed once we drop v12 support.