From ba43914f24650e3db4d2ae124d4c7c87b2976f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Fri, 17 Jan 2025 15:36:00 +0100 Subject: [PATCH] feat: additional text field in travel info --- .../Classes/Domain/Model/Travelinfo.php | 17 +++++++++++++++++ .../tx_epproducts_domain_model_travelinfo.php | 13 ++++++++++++- public/typo3conf/ext/ep_products/ext_tables.sql | 1 + .../Resources/Private/Partials/Travelinfo.html | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Travelinfo.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Travelinfo.php index 388aa075..ad55bf26 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Travelinfo.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Travelinfo.php @@ -44,6 +44,11 @@ class Travelinfo extends AbstractEntity */ protected $busInfoText; + /** + * @var string + */ + protected $departureText; + /** * @var string */ @@ -193,6 +198,18 @@ class Travelinfo extends AbstractEntity return $this; } + public function getDepartureText() + { + return $this->departureText; + } + + public function setDepartureText($departureText) + { + $this->departureText = $departureText; + + return $this; + } + public function getFooterText() { return $this->footerText; diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfo.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfo.php index 094c828b..2b9258cb 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfo.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfo.php @@ -30,7 +30,7 @@ return [ 'basics' => ['showitem' => 'title,path_segment,--linebreak--,product,hide_address,--linebreak--,links, --linebreak--,teasers'], 'text' => ['showitem' => 'subline,headline,--linebreak--,intro_text,--linebreak--, bus_info_text,--linebreak--, - footer_text,--linebreak--,self_arranged_text,--linebreak--,additional_info, + departure_text,--linebreak--,footer_text,--linebreak--,self_arranged_text,--linebreak--,additional_info, --linebreak--,important_phone_numbers,--linebreak--,important_links'], 'images' => ['showitem' => 'header_image,--linebreak--,footer_image'], ], @@ -248,6 +248,17 @@ return [ 'enableRichtext' => true, ] ], + 'departure_text' => [ + 'exclude' => false, + 'label' => 'Abreise', + 'config' => [ + 'type' => 'text', + 'cols' => 40, + 'rows' => 3, + 'eval' => 'trim', + 'enableRichtext' => true, + ] + ], 'footer_text' => [ 'exclude' => false, 'label' => 'Footertext', diff --git a/public/typo3conf/ext/ep_products/ext_tables.sql b/public/typo3conf/ext/ep_products/ext_tables.sql index 79a2c806..e2e5a020 100644 --- a/public/typo3conf/ext/ep_products/ext_tables.sql +++ b/public/typo3conf/ext/ep_products/ext_tables.sql @@ -1369,6 +1369,7 @@ CREATE TABLE tx_epproducts_domain_model_travelinfo subline varchar(255) DEFAULT '' NOT NULL, intro_text text DEFAULT '0' NOT NULL, bus_info_text text DEFAULT '0' NOT NULL, + departure_text text DEFAULT '0' NOT NULL, footer_text text DEFAULT '0' NOT NULL, self_arranged_text text DEFAULT '0' NOT NULL, additional_info text DEFAULT '0' NOT NULL, diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Travelinfo.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Travelinfo.html index a56c7214..bfebb6f4 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Travelinfo.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Travelinfo.html @@ -278,6 +278,7 @@ + {travelinfo.departureText -> f:format.html()}