2019-07-18 13:44:19 +02:00
< ? php
2021-01-12 16:42:58 +01:00
2023-11-27 10:04:42 +01:00
declare ( strict_types = 1 );
use TYPO3\CMS\Core\Resource\File ;
2021-02-11 13:13:05 +01:00
$l10nPathGeneral = 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf' ;
2023-11-27 10:04:42 +01:00
$l10nPathLang = 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf' ;
2021-02-11 13:13:05 +01:00
$l10nPathFE = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf' ;
$l10nPath = 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf' ;
2022-08-02 15:56:18 +02:00
$l10nLocationPath = 'LLL:EXT:events/Resources/Private/Language/locallang_csh_location.xlf' ;
2021-02-11 13:13:05 +01:00
2019-07-18 13:44:19 +02:00
return [
'ctrl' => [
2021-02-11 13:13:05 +01:00
'title' => $l10nPath . ':tx_events_domain_model_event' ,
2019-07-18 13:44:19 +02:00
'label' => 'title' ,
'tstamp' => 'tstamp' ,
'crdate' => 'crdate' ,
'versioningWS' => true ,
'languageField' => 'sys_language_uid' ,
'transOrigPointerField' => 'l10n_parent' ,
'transOrigDiffSourceField' => 'l10n_diffsource' ,
'delete' => 'deleted' ,
'enablecolumns' => [
'disabled' => 'hidden' ,
'starttime' => 'starttime' ,
'endtime' => 'endtime' ,
],
2021-02-15 09:58:51 +01:00
'searchFields' => 'title,subtitle,global_id,teaser' ,
2023-06-07 08:56:42 +02:00
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_event.svg' ,
2019-07-18 13:44:19 +02:00
],
'types' => [
2021-02-11 13:13:05 +01:00
'1' => [
2023-08-10 15:02:05 +02:00
'showitem' => '
2021-02-11 13:13:05 +01:00
sys_language_uid ,
l10n_parent ,
l10n_diffsource ,
hidden ,
highlight ,
title ,
2021-02-15 09:58:51 +01:00
subtitle ,
2021-02-11 13:13:05 +01:00
teaser ,
slug ,
ticket ,
global_id ,
2023-08-10 15:02:05 +02:00
-- palette -- ;; source ,
2021-02-11 13:13:05 +01:00
-- div -- ; ' . $l10nPath . ' : tx_events_domain_model_event . tabs . text ,
details ,
price_info ,
-- div -- ; ' . $l10nPath . ' : tx_events_domain_model_event . tabs . dates ,
dates ,
-- div -- ; ' . $l10nPath . ' : tx_events_domain_model_event . tabs . location ,
2022-08-02 15:56:18 +02:00
location ,
2021-02-11 13:13:05 +01:00
-- div -- ; ' . $l10nPath . ' : tx_events_domain_model_event . tabs . relations ,
organizer ,
region ,
partner ,
categories ,
2022-07-05 14:08:14 +02:00
features ,
2023-11-29 10:36:59 +01:00
keywords ,
2021-07-13 09:31:01 +02:00
references_events ,
2021-02-11 13:13:05 +01:00
pages ,
-- div -- ; ' . $l10nPath . ' : tx_events_domain_model_event . tabs . media ,
images ,
-- div -- ; ' . $l10nPath . ' : tx_events_domain_model_event . tabs . social ,
2022-08-02 15:56:18 +02:00
web ,
2021-02-11 13:13:05 +01:00
facebook ,
youtube ,
instagram ,
-- div -- ; ' . $l10nPathFE . ' : tabs . access ,
starttime ,
2023-06-07 08:56:42 +02:00
endtime ' ,
2021-02-11 13:13:05 +01:00
],
2019-07-18 13:44:19 +02:00
],
2023-08-10 15:02:05 +02:00
'palettes' => [
'source' => [
'label' => $l10nPath . ':tx_events_domain_model_event.palette.source' ,
'showitem' => 'source_name, source_url' ,
],
],
2019-07-18 13:44:19 +02:00
'columns' => [
'sys_language_uid' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPathGeneral . ':LGL.language' ,
2023-11-27 10:04:42 +01:00
'config' => [ 'type' => 'language' ],
2019-07-18 13:44:19 +02:00
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0' ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPathGeneral . ':LGL.l18n_parent' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'select' ,
'renderType' => 'selectSingle' ,
'default' => 0 ,
'items' => [
2023-11-27 10:04:42 +01:00
[ 'label' => '' , 'value' => 0 ],
2019-07-18 13:44:19 +02:00
],
'foreign_table' => 'tx_events_domain_model_event' ,
'foreign_table_where' => 'AND {#tx_events_domain_model_event}.{#pid}=###CURRENT_PID### AND {#tx_events_domain_model_event}.{#sys_language_uid} IN (-1,0)' ,
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough' ,
],
],
't3ver_label' => [
2021-02-11 13:13:05 +01:00
'label' => $l10nPathGeneral . ':LGL.versionLabel' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'input' ,
'size' => 30 ,
'max' => 255 ,
],
],
'hidden' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPathGeneral . ':LGL.visible' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'check' ,
'renderType' => 'checkboxToggle' ,
'items' => [
[
2023-11-27 10:04:42 +01:00
'label' => '' ,
2023-06-07 08:56:42 +02:00
'invertStateDisplay' => true ,
],
2019-07-18 13:44:19 +02:00
],
],
],
'starttime' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPathGeneral . ':LGL.starttime' ,
2019-07-18 13:44:19 +02:00
'config' => [
2023-11-27 10:04:42 +01:00
'type' => 'datetime' ,
'format' => 'datetime' ,
2019-07-18 13:44:19 +02:00
'behaviour' => [
2023-06-07 08:56:42 +02:00
'allowLanguageSynchronization' => true ,
],
2019-07-18 13:44:19 +02:00
],
],
'endtime' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPathGeneral . ':LGL.endtime' ,
2019-07-18 13:44:19 +02:00
'config' => [
2023-11-27 10:04:42 +01:00
'type' => 'datetime' ,
'format' => 'datetime' ,
2019-07-18 13:44:19 +02:00
'behaviour' => [
2023-06-07 08:56:42 +02:00
'allowLanguageSynchronization' => true ,
],
2019-07-18 13:44:19 +02:00
],
],
'title' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.title' ,
2019-07-18 13:44:19 +02:00
'config' => [
2021-03-08 13:45:31 +01:00
'type' => 'text' ,
'cols' => 40 ,
'rows' => 2 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
],
2019-07-18 13:44:19 +02:00
],
2021-02-15 09:58:51 +01:00
'subtitle' => [
'exclude' => true ,
'label' => $l10nPath . ':tx_events_domain_model_event.subtitle' ,
'config' => [
2021-03-08 13:45:31 +01:00
'type' => 'text' ,
'cols' => 40 ,
'rows' => 2 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
],
2021-02-15 09:58:51 +01:00
],
2019-07-18 13:44:19 +02:00
'global_id' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.global_id' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'input' ,
'size' => 30 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
2019-07-18 13:44:19 +02:00
],
],
2023-08-10 15:02:05 +02:00
'source_name' => [
'exclude' => true ,
'label' => $l10nPath . ':tx_events_domain_model_event.source_name' ,
'config' => [
'type' => 'input' ,
'readOnly' => true ,
],
],
'source_url' => [
'exclude' => true ,
'label' => $l10nPath . ':tx_events_domain_model_event.source_url' ,
'config' => [
2023-11-27 10:04:42 +01:00
'type' => 'link' ,
2023-08-10 15:02:05 +02:00
'readOnly' => true ,
],
],
2019-07-18 13:44:19 +02:00
'slug' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.slug' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'slug' ,
'size' => 50 ,
'generatorOptions' => [
'fields' => [ 'title' ],
'fieldSeparator' => '/' ,
'prefixParentPageSlug' => false ,
],
'fallbackCharacter' => '-' ,
'eval' => 'uniqueInSite' ,
'default' => '' ,
],
],
'highlight' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.highlight' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'check' ,
2023-11-02 14:49:05 +01:00
'renderType' => 'checkboxToggle' ,
2019-07-18 13:44:19 +02:00
'items' => [
2023-11-02 14:49:05 +01:00
[
2023-11-27 10:04:42 +01:00
'label' => '' ,
2023-11-02 14:49:05 +01:00
'invertStateDisplay' => false ,
2023-06-07 08:56:42 +02:00
],
2019-07-18 13:44:19 +02:00
],
'default' => 0 ,
2023-06-07 08:56:42 +02:00
],
2019-07-18 13:44:19 +02:00
],
'teaser' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.teaser' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'text' ,
2021-02-11 13:13:05 +01:00
'cols' => 30 ,
'rows' => 5 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
],
2019-07-18 13:44:19 +02:00
],
'details' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.details' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'text' ,
'enableRichtext' => true ,
'fieldControl' => [
'fullScreenRichtext' => [
'disabled' => false ,
],
],
'cols' => 40 ,
'rows' => 15 ,
'eval' => 'trim' ,
],
2021-01-11 09:20:51 +01:00
2019-07-18 13:44:19 +02:00
],
'price_info' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.price_info' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'text' ,
'cols' => 40 ,
'rows' => 15 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
],
2019-07-18 13:44:19 +02:00
],
'web' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.web' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'input' ,
'size' => 30 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
2019-07-18 13:44:19 +02:00
],
],
2020-08-19 11:30:13 +02:00
'ticket' => [
2019-07-18 13:44:19 +02:00
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.ticket' ,
2019-07-18 13:44:19 +02:00
'config' => [
2023-11-27 10:04:42 +01:00
'type' => 'link' ,
2021-02-11 13:13:05 +01:00
'size' => 50 ,
2019-07-18 13:44:19 +02:00
],
],
2020-08-19 11:30:13 +02:00
'facebook' => [
2019-07-18 13:44:19 +02:00
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.facebook' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'input' ,
'size' => 30 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
2019-07-18 13:44:19 +02:00
],
],
2020-08-19 11:30:13 +02:00
'youtube' => [
2019-07-18 13:44:19 +02:00
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.youtube' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'input' ,
'size' => 30 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
2019-07-18 13:44:19 +02:00
],
],
2020-08-19 11:30:13 +02:00
'instagram' => [
2019-07-18 13:44:19 +02:00
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.instagram' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'input' ,
'size' => 30 ,
2023-06-07 08:56:42 +02:00
'eval' => 'trim' ,
2019-07-18 13:44:19 +02:00
],
],
'images' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.images' ,
2023-11-27 10:04:42 +01:00
'config' => [
'type' => 'file' ,
'maxitems' => 8 ,
'allowed' => 'common-image-types' ,
// custom configuration for displaying fields in the overlay/reference table
// to use the imageoverlayPalette instead of the basicoverlayPalette
'overrideChildTca' => [
'types' => [
2019-07-18 13:44:19 +02:00
'0' => [
'showitem' => '
2023-11-27 10:04:42 +01:00
-- palette -- ;; imageoverlayPalette ,
-- palette -- ;; filePalette ' ,
2019-07-18 13:44:19 +02:00
],
2023-11-27 10:04:42 +01:00
File :: FILETYPE_IMAGE => [
2019-07-18 13:44:19 +02:00
'showitem' => '
2023-11-27 10:04:42 +01:00
-- palette -- ;; imageoverlayPalette ,
-- palette -- ;; filePalette ' ,
2023-06-07 08:56:42 +02:00
],
2019-07-18 13:44:19 +02:00
],
],
2023-11-27 10:04:42 +01:00
],
2019-07-18 13:44:19 +02:00
],
2021-01-11 09:20:51 +01:00
'pages' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.pages' ,
2021-01-11 09:20:51 +01:00
'config' => [
'type' => 'group' ,
'allowed' => 'pages' ,
],
],
2019-07-18 13:44:19 +02:00
'categories' => [
'exclude' => true ,
2023-11-27 10:04:42 +01:00
'label' => 'Categories' ,
'config' => [
'type' => 'category' ,
'minitems' => 0 ,
],
2022-07-05 14:08:14 +02:00
],
'features' => [
'exclude' => true ,
2023-11-27 10:04:42 +01:00
'label' => 'Features' ,
'config' => [
'type' => 'category' ,
'minitems' => 0 ,
],
2019-07-18 13:44:19 +02:00
],
2023-11-29 10:36:59 +01:00
'keywords' => [
'exclude' => true ,
'label' => 'Keywords' ,
'config' => [
'type' => 'text' ,
'cols' => 40 ,
'rows' => 3 ,
],
],
2019-07-18 13:44:19 +02:00
'dates' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.dates' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'inline' ,
'foreign_table' => 'tx_events_domain_model_date' ,
'foreign_field' => 'event' ,
'maxitems' => 9999 ,
'appearance' => [
'collapseAll' => 1 ,
'useSortable' => 0 ,
'expandSingle' => 1 ,
2023-06-07 08:56:42 +02:00
'enabledControls' => [
2019-07-18 13:44:19 +02:00
'info' => false ,
2021-11-23 08:28:22 +01:00
'new' => true ,
'dragdrop' => true ,
'sort' => true ,
2019-07-18 13:44:19 +02:00
'hide' => false ,
2021-03-16 13:32:34 +01:00
'delete' => true ,
2019-07-18 13:44:19 +02:00
'localize' => false ,
2023-06-07 08:56:42 +02:00
],
2019-07-18 13:44:19 +02:00
'levelLinksPosition' => 'top' ,
'showPossibleLocalizationRecords' => false ,
'showSynchronizationLink' => false ,
'showAllLocalizationLink' => false ,
],
],
],
2022-08-02 15:56:18 +02:00
'location' => [
'exclude' => true ,
'label' => $l10nPath . ':tx_events_domain_model_event.location' ,
'config' => [
'type' => 'select' ,
'renderType' => 'selectSingle' ,
'foreign_table' => 'tx_events_domain_model_location' ,
'default' => 0 ,
'minitems' => 0 ,
'maxitems' => 1 ,
],
],
2019-07-18 13:44:19 +02:00
'organizer' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.organizer' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'select' ,
'renderType' => 'selectSingle' ,
'foreign_table' => 'tx_events_domain_model_organizer' ,
2021-02-24 16:08:17 +01:00
'default' => 0 ,
2019-07-18 13:44:19 +02:00
'minitems' => 0 ,
'maxitems' => 1 ,
],
],
'region' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.region' ,
2019-07-18 13:44:19 +02:00
'config' => [
'type' => 'select' ,
'renderType' => 'selectSingle' ,
'foreign_table' => 'tx_events_domain_model_region' ,
2021-02-24 16:08:17 +01:00
'default' => 0 ,
2019-07-18 13:44:19 +02:00
'minitems' => 0 ,
'maxitems' => 1 ,
],
],
2021-01-11 10:15:21 +01:00
2021-07-13 09:31:01 +02:00
'references_events' => [
'exclude' => true ,
'label' => $l10nPath . ':tx_events_domain_model_event.references_events' ,
'config' => [
'type' => 'group' ,
'allowed' => 'tx_events_domain_model_event' ,
'suggestOptions' => [
'tx_events_domain_model_event' => [
'searchCondition' => 'tx_events_domain_model_event.sys_language_uid IN (0, -1)' ,
],
],
],
],
2021-01-11 10:15:21 +01:00
'partner' => [
'exclude' => true ,
2021-02-11 13:13:05 +01:00
'label' => $l10nPath . ':tx_events_domain_model_event.partner' ,
2021-01-11 10:15:21 +01:00
'config' => [
'type' => 'group' ,
'allowed' => 'tx_events_domain_model_partner' ,
'fieldControl' => [
'addRecord' => [
'disabled' => false ,
'pid' => '###CURRENT_PID###' ,
'table' => 'tx_events_domain_model_partner' ,
],
],
],
],
2019-07-18 13:44:19 +02:00
],
];