2021-02-03 17:20:01 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
defined('TYPO3') or die();
|
|
|
|
|
|
|
|
(static function (string $extensionKey, string $tableName, string $cType) {
|
|
|
|
$languagePath = \WerkraumMedia\ThueCat\Extension::getLanguagePath()
|
|
|
|
. 'locallang_tca.xlf:' . $tableName . '.' . $cType;
|
|
|
|
|
|
|
|
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
|
|
|
|
'ctrl' => [
|
2021-02-18 08:49:27 +01:00
|
|
|
'typeicon_classes' => [
|
|
|
|
$cType => 'tx_' . $cType,
|
|
|
|
],
|
2021-02-03 17:20:01 +01:00
|
|
|
],
|
|
|
|
'types' => [
|
|
|
|
$cType => [
|
2021-02-18 14:54:00 +01:00
|
|
|
'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,'
|
2021-02-03 17:20:01 +01:00
|
|
|
. '--palette--;;general,'
|
|
|
|
. '--palette--;;headers,'
|
|
|
|
. 'records,'
|
|
|
|
. '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,'
|
|
|
|
. '--palette--;;frames,'
|
|
|
|
. '--palette--;;appearanceLinks,'
|
|
|
|
. '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,'
|
|
|
|
. '--palette--;;language,'
|
|
|
|
. '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,'
|
|
|
|
. '--palette--;;hidden,'
|
|
|
|
. '--palette--;;access,'
|
|
|
|
. '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,'
|
|
|
|
. '--div--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.tabs.category,'
|
|
|
|
. 'categories,'
|
|
|
|
. '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,'
|
|
|
|
. 'rowDescription,'
|
|
|
|
. '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended',
|
|
|
|
'columnsOverrides' => [
|
|
|
|
'records' => [
|
|
|
|
'config' => [
|
|
|
|
'allowed' => 'tx_thuecat_tourist_attraction',
|
2021-02-16 17:12:47 +01:00
|
|
|
'suggestOptions' => [
|
|
|
|
'tx_thuecat_tourist_attraction' => [
|
|
|
|
'addWhere' => 'sys_language_uid in (0,-1)',
|
|
|
|
],
|
|
|
|
],
|
2021-02-03 17:20:01 +01:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
|
|
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
|
|
|
$tableName,
|
|
|
|
'CType',
|
|
|
|
[
|
|
|
|
$languagePath,
|
|
|
|
$cType,
|
2021-02-18 08:49:27 +01:00
|
|
|
\WerkraumMedia\ThueCat\Extension::getIconPath() . 'tx_' . $cType . '.svg',
|
|
|
|
\WerkraumMedia\ThueCat\Extension::TCA_SELECT_GROUP_IDENTIFIER,
|
2021-02-03 17:20:01 +01:00
|
|
|
]
|
|
|
|
);
|
|
|
|
})(
|
|
|
|
\WerkraumMedia\ThueCat\Extension::EXTENSION_KEY,
|
|
|
|
'tt_content',
|
|
|
|
'thuecat_tourist_attraction'
|
|
|
|
);
|