Skip to content

Commit

Permalink
[TASK] Update tca for sys_file_reference
Browse files Browse the repository at this point in the history
  • Loading branch information
georgringer committed Apr 15, 2024
1 parent 227886b commit ebf86bc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Configuration/TCA/Overrides/sys_file_reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@

$emConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\GeorgRinger\News\Domain\Model\Dto\EmConfiguration::class);
if ($emConfiguration->isAdvancedMediaPreview()) {
$typo3Version = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class)->getMajorVersion();

$fieldConfig = [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => $typo3Version < 12 ? [
['LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_media.showinviews.0', 0, ''],
['LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_media.showinviews.1', 1, ''],
['LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_media.showinviews.2', 2, ''],
] : [
'items' => [
['label' => 'LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_media.showinviews.0', 'value' => 0],
['label' => 'LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_media.showinviews.1', 'value' => 1],
['label' => 'LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_media.showinviews.2', 'value' => 2],
Expand Down

0 comments on commit ebf86bc

Please sign in to comment.