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
This commit is contained in:
Daniel Siepmann (Codappix) 2024-11-04 11:50:14 +01:00
parent 51f75d0216
commit 5f0588565f
SSH key fingerprint: SHA256:nAjx3Dpp8kuAC+S7QXj8BWmqw+KI1Miu+5e40BP3LXA
5 changed files with 55 additions and 5 deletions

View file

@ -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(

View file

@ -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
}
}
}
}
}
}

View file

@ -0,0 +1 @@
@import 'EXT:events/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig'

View file

@ -32,4 +32,5 @@ Nothing
Deprecation
-----------
Nothing
* The existing content elements are deprecated.
We recommend to build your own dedicated content elements.

View file

@ -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.