From 5d5ab60b39d83a88d408d8988ed8940592cb1a6a Mon Sep 17 00:00:00 2001 From: Arber Sala Date: Mon, 8 Apr 2024 17:50:26 +0100 Subject: [PATCH] [TASK] created partner logo element --- .../TCA/Overrides/tt_content.php | 36 +++++++++++++++++++ .../Private/Language/locallang_ctypes.xlf | 10 ++++++ 2 files changed, 46 insertions(+) diff --git a/local_packages/success/Configuration/TCA/Overrides/tt_content.php b/local_packages/success/Configuration/TCA/Overrides/tt_content.php index 14eadea..067e9cb 100644 --- a/local_packages/success/Configuration/TCA/Overrides/tt_content.php +++ b/local_packages/success/Configuration/TCA/Overrides/tt_content.php @@ -255,3 +255,39 @@ ]; $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['success_gallery'] = 'content-image'; + +// Partner Logo Element +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + 'tt_content', + 'CType', + [ + 'label' => 'LLL:EXT:success/Resources/Private/Language/locallang_ctypes.xlf:partner', + 'value' => 'success_partner', + 'icon' => 'actions-briefcase', + 'group' => 'default', + 'description' => 'LLL:EXT:success/Resources/Private/Language/locallang_ctypes.xlf:partner.description', + ] +); + +$tx_success_partner = [ + 'tx_success_partner' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:success/Resources/Private/Language/locallang_ctypes.xlf:partner.item', + 'config' => [ + 'type' => 'file', + 'allowed' => 'common-image-types', + 'maxitems' => 2, + ], + ] +]; + +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $tx_success_partner); + +$GLOBALS['TCA']['tt_content']['types']['success_partner'] = [ + 'showitem' => ' + --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, + --palette--;;general, + --palette--;;headers,tx_success_partner' +]; + +$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['success_partner'] = 'actions-briefcase'; diff --git a/local_packages/success/Resources/Private/Language/locallang_ctypes.xlf b/local_packages/success/Resources/Private/Language/locallang_ctypes.xlf index 2d4461b..a31f3f0 100644 --- a/local_packages/success/Resources/Private/Language/locallang_ctypes.xlf +++ b/local_packages/success/Resources/Private/Language/locallang_ctypes.xlf @@ -57,6 +57,16 @@ Images + + Partner Logo Element + + + A list of partner logos + + + Logos + +