Skip to content

Commit

Permalink
chore: Define new content element wizard item in TCA
Browse files Browse the repository at this point in the history
  • Loading branch information
brotkrueml committed Sep 3, 2024
1 parent f82fd72 commit d184c09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@

defined('TYPO3') || die();

(static function ($contentType = 'tx_jobrouterdata_table'): void {
(static function ($contentType = 'tx_jobrouterdata_table', $icon = 'jobrouter-data-ce-table'): void {
ExtensionManagementUtility::addPlugin(
[
Extension::LANGUAGE_PATH_CONTENT_ELEMENT . ':ce.title',
$contentType,
'EXT:' . Extension::KEY . '/Resources/Public/Icons/ce-table.svg',
'label' => Extension::LANGUAGE_PATH_CONTENT_ELEMENT . ':ce.title',
'description' => Extension::LANGUAGE_PATH_CONTENT_ELEMENT . ':ce.description',
'group' => 'special',
'value' => $contentType,
'icon' => $icon,
],
'CType',
Extension::KEY,
Expand Down Expand Up @@ -56,5 +58,5 @@
',
];

$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$contentType] = 'jobrouter-data-ce-table';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$contentType] = $icon;
})();
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# @todo Drop file when compatibility with TYPO3 v12 is removed
mod.wizards.newContentElement.wizardItems {
special {
elements {
Expand Down
5 changes: 4 additions & 1 deletion Configuration/page.tsconfig
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
@import "EXT:jobrouter_data/Configuration/TSconfig/Page/NewContentElementWizard.tsconfig"
# @todo Drop file when compatibility with TYPO3 v12 is removed
[typo3.branch == "12.4"]
@import "EXT:jobrouter_data/Configuration/TSconfig/Page/NewContentElementWizard.tsconfig"
[END]

0 comments on commit d184c09

Please sign in to comment.