From ce9a1e17e5c7d550cc1d9a7ffdb0d814d55216f6 Mon Sep 17 00:00:00 2001 From: Dirk Koritnik Date: Mon, 15 Feb 2021 09:58:51 +0100 Subject: [PATCH] Add subtitle filed to event --- Classes/Domain/Model/Event.php | 24 +++++++++++++++++++ .../TCA/tx_events_domain_model_event.php | 12 +++++++++- .../Language/de.locallang_csh_event.xlf | 4 ++++ .../Private/Language/locallang_csh_event.xlf | 3 +++ ext_tables.sql | 1 + 5 files changed, 43 insertions(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Event.php b/Classes/Domain/Model/Event.php index 1ed3320..b74e9ad 100644 --- a/Classes/Domain/Model/Event.php +++ b/Classes/Domain/Model/Event.php @@ -24,6 +24,13 @@ class Event extends AbstractEntity */ protected $title = ''; + /** + * subtitle + * + * @var string + */ + protected $subtitle = ''; + /** * globalId * @@ -283,6 +290,23 @@ class Event extends AbstractEntity $this->title = $title; } + /** + * @return string $subtitle + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * @param string $subtitle + * @return void + */ + public function setSubtitle($subtitle) + { + $this->subtitle = $subtitle; + } + /** * @return string $teaser */ diff --git a/Configuration/TCA/tx_events_domain_model_event.php b/Configuration/TCA/tx_events_domain_model_event.php index 6aac2a6..abe1ab1 100644 --- a/Configuration/TCA/tx_events_domain_model_event.php +++ b/Configuration/TCA/tx_events_domain_model_event.php @@ -25,7 +25,7 @@ return [ 'starttime' => 'starttime', 'endtime' => 'endtime', ], - 'searchFields' => 'title,global_id,teaser', + 'searchFields' => 'title,subtitle,global_id,teaser', 'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_event.svg' ], 'types' => [ @@ -37,6 +37,7 @@ return [ hidden, highlight, title, + subtitle, teaser, slug, ticket, @@ -174,6 +175,15 @@ return [ 'eval' => 'trim' ] ], + 'subtitle' => [ + 'exclude' => true, + 'label' => $l10nPath . ':tx_events_domain_model_event.subtitle', + 'config' => [ + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ] + ], 'global_id' => [ 'exclude' => true, 'label' => $l10nPath . ':tx_events_domain_model_event.global_id', diff --git a/Resources/Private/Language/de.locallang_csh_event.xlf b/Resources/Private/Language/de.locallang_csh_event.xlf index e132bc2..ced4f75 100644 --- a/Resources/Private/Language/de.locallang_csh_event.xlf +++ b/Resources/Private/Language/de.locallang_csh_event.xlf @@ -43,6 +43,10 @@ Title Titel + + Subtitle + Untertitel + Global UID Globale UID diff --git a/Resources/Private/Language/locallang_csh_event.xlf b/Resources/Private/Language/locallang_csh_event.xlf index cd72963..32c079c 100644 --- a/Resources/Private/Language/locallang_csh_event.xlf +++ b/Resources/Private/Language/locallang_csh_event.xlf @@ -33,6 +33,9 @@ Title + + Subtitle + Global UID diff --git a/ext_tables.sql b/ext_tables.sql index 9122971..224a099 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -4,6 +4,7 @@ CREATE TABLE tx_events_domain_model_event ( title varchar(255) DEFAULT '' NOT NULL, + subtitle text, global_id varchar(255) DEFAULT '' NOT NULL, slug varchar(255) DEFAULT '' NOT NULL, highlight smallint(5) unsigned DEFAULT '0' NOT NULL,