From 41b9302d9bde110ba5d79915b7e15985a482a604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 21 Oct 2026 14:14:38 +0200 Subject: [PATCH] refactor: apply TYPO3 13 Rector and Fractor migrations Automated migrations from rector.php and fractor.php (TCA, Extbase controllers and annotations, ViewHelpers, QueryBuilder, FlexForms, TypoScript conditions). Plugins stay list_type plugins: Rector switched them to content element types, which needs a tt_content migration. That is deferred to the TYPO3 14 step, where list_type is removed. Co-Authored-By: Claude Opus 5.5 --- .../Classes/Command/DateCommandController.php | 2 +- .../Classes/ContentFeed/ManifestBuilder.php | 4 +- .../Classes/ContentFeed/PageTree.php | 4 +- .../Classes/ContentFeed/RecordFinder.php | 10 +- .../Classes/ContentFeed/RecordSerializer.php | 28 +- .../Controller/AjaxTableController.php | 48 +- .../Controller/AjaxTeaserPopupController.php | 4 +- .../Classes/Controller/ProductController.php | 36 +- .../Domain/Model/AbstractDestination.php | 37 +- .../Classes/Domain/Model/Badge.php | 5 +- .../ep_products/Classes/Domain/Model/City.php | 33 +- .../Classes/Domain/Model/Concept.php | 53 +- .../Classes/Domain/Model/Contingent.php | 2 +- .../Classes/Domain/Model/Country.php | 25 +- .../ep_products/Classes/Domain/Model/Date.php | 5 +- .../Dto/NewsletterSubscriptionRequest.php | 21 +- .../ep_products/Classes/Domain/Model/Fact.php | 5 +- .../ep_products/Classes/Domain/Model/Faq.php | 5 +- .../Classes/Domain/Model/Hotel.php | 4 +- .../Classes/Domain/Model/Journey.php | 12 +- .../Classes/Domain/Model/MatchCode.php | 5 +- .../Classes/Domain/Model/Officetip.php | 7 +- .../Classes/Domain/Model/Product.php | 130 ++--- .../Classes/Domain/Model/Region.php | 71 +-- .../Classes/Domain/Model/Reseller.php | 7 +- .../Classes/Domain/Model/Snowreport.php | 19 +- .../Classes/Domain/Model/Teammember.php | 15 +- .../Classes/Domain/Model/TeaserInterface.php | 2 +- .../Classes/Domain/Model/Webcam.php | 7 +- .../Domain/Repository/AbstractRepository.php | 25 +- .../Domain/Repository/DateRepository.php | 4 +- .../Domain/Repository/HotelRepository.php | 10 +- .../Domain/Repository/ProductRepository.php | 10 +- .../Classes/Middleware/ApiMiddleware.php | 18 +- .../Classes/Service/HotelDataService.php | 2 +- .../Classes/Service/ProductImportSource.php | 4 +- .../Classes/Service/ResellerDataService.php | 5 +- .../Classes/Traits/DbConnectionTrait.php | 4 +- .../RequestArgumentTypeConversionTrait.php | 2 +- .../Updates/EPEpProductsCTypeMigration.php | 41 ++ .../Classes/UserFunc/TcaProcFunc.php | 5 +- .../Classes/Utility/SerializationUtility.php | 4 +- .../ep_products/Configuration/Commands.php | 4 +- .../FlexForms/flexform_product_detail.xml | 137 +++-- .../FlexForms/flexform_product_pricetable.xml | 93 ++-- .../FlexForms/flexform_product_teaser.xml | 493 +++++++++--------- packages/ep_products/Configuration/Icons.php | 8 + .../Configuration/RequestMiddlewares.php | 7 +- .../TCA/Overrides/sys_template.php | 6 +- .../TCA/Overrides/tt_content.php | 25 +- .../tx_epproducts_domain_model_teammember.php | 11 +- .../TCA/tx_epproducts_domain_model_badge.php | 29 +- .../TCA/tx_epproducts_domain_model_city.php | 200 ++++--- .../tx_epproducts_domain_model_concept.php | 233 ++++----- .../tx_epproducts_domain_model_contingent.php | 54 +- .../tx_epproducts_domain_model_country.php | 209 ++++---- .../TCA/tx_epproducts_domain_model_date.php | 44 +- .../TCA/tx_epproducts_domain_model_fact.php | 29 +- .../TCA/tx_epproducts_domain_model_faq.php | 56 +- ...products_domain_model_groupspriceboard.php | 34 +- ...roducts_domain_model_groupspriceconfig.php | 61 +-- ...roducts_domain_model_groupspriceoption.php | 47 +- .../TCA/tx_epproducts_domain_model_hotel.php | 277 +++++----- ..._epproducts_domain_model_hotel_mapping.php | 26 +- .../tx_epproducts_domain_model_infobox.php | 29 +- .../tx_epproducts_domain_model_journey.php | 59 +-- .../tx_epproducts_domain_model_matchcode.php | 30 +- .../tx_epproducts_domain_model_officetip.php | 34 +- .../tx_epproducts_domain_model_product.php | 378 +++++++------- .../TCA/tx_epproducts_domain_model_region.php | 266 +++++----- .../tx_epproducts_domain_model_reseller.php | 29 +- .../tx_epproducts_domain_model_snowreport.php | 80 ++- .../tx_epproducts_domain_model_teammember.php | 61 +-- .../TCA/tx_epproducts_domain_model_webcam.php | 33 +- .../TypoScript/constants.typoscript | 98 ++-- .../Configuration/TypoScript/setup.typoscript | 6 +- .../Resources/Private/Language/locallang.xlf | 132 ++--- packages/ep_products/ext_emconf.php | 4 - packages/ep_products/ext_localconf.php | 53 +- .../DataProcessing/ProductRatingProcessor.php | 8 +- .../DataProcessing/SliderProcessor.php | 2 +- .../DataProcessing/TeaserProcessor.php | 28 +- .../ep_theme/Classes/Domain/Model/Page.php | 4 +- .../MetaTag/OpenGraphMetaTagManager.php | 2 +- .../ViewHelpers/ContainerViewHelper.php | 45 +- .../FilterSettingsEncoderViewHelper.php | 15 +- .../ViewHelpers/GmapsUrlViewHelper.php | 15 +- .../Classes/ViewHelpers/IconViewHelper.php | 2 - .../Classes/ViewHelpers/MyEpUrlViewHelper.php | 10 +- .../ViewHelpers/NightsOptionsViewHelper.php | 14 +- .../Classes/ViewHelpers/RatingViewHelper.php | 15 +- .../ViewHelpers/ThemeClassesViewHelper.php | 17 +- .../ViewHelpers/Uri/AjaxViewHelper.php | 2 +- .../ViewHelpers/Uri/ProductViewHelper.php | 33 +- .../ViewHelpers/Uri/VideoViewHelper.php | 18 +- .../Extbase/Persistence/Classes.php | 4 +- .../Configuration/TCA/Overrides/pages.php | 16 +- .../Configuration/TCA/Overrides/sys_file.php | 6 +- .../TCA/Overrides/sys_template.php | 6 +- .../TCA/Overrides/tt_content.php | 41 +- .../Overrides/tt_content_element_button.php | 14 +- .../tt_content_element_container.php | 12 +- .../Overrides/tt_content_element_teaser.php | 76 +-- .../tx_eptheme_domain_model_badge.php | 3 + .../tx_eptheme_domain_model_slide.php | 3 + .../TCA/tx_eptheme_domain_model_slide.php | 145 +++--- .../BackendLayouts/FrontpageEvent.tsconfig | 1 - .../TSconfig/Page/TCEFORM.tsconfig | 8 +- .../ContentElements/list.typoscript | 1 - .../Extensions/FluidStyledContent.typoscript | 1 - .../TypoScript/Extensions/Seo.typoscript | 2 +- .../TypoScript/Library/Sitemap.typoscript | 34 +- .../TypoScript/Page/Main.typoscript | 22 +- .../Configuration/TypoScript/setup.typoscript | 8 +- .../Private/Language/de.locallang.xlf | 8 +- .../Resources/Private/Language/locallang.xlf | 4 - packages/ep_theme/ext_emconf.php | 4 - packages/ep_theme/ext_localconf.php | 15 +- packages/ep_theme/ext_tables.php | 13 +- 119 files changed, 2211 insertions(+), 2581 deletions(-) create mode 100644 packages/ep_products/Classes/Updates/EPEpProductsCTypeMigration.php create mode 100644 packages/ep_products/Configuration/Icons.php create mode 100644 packages/ep_theme/Configuration/TCA/Overrides/tx_eptheme_domain_model_badge.php create mode 100644 packages/ep_theme/Configuration/TCA/Overrides/tx_eptheme_domain_model_slide.php diff --git a/packages/ep_products/Classes/Command/DateCommandController.php b/packages/ep_products/Classes/Command/DateCommandController.php index 8c352b7..df483c1 100644 --- a/packages/ep_products/Classes/Command/DateCommandController.php +++ b/packages/ep_products/Classes/Command/DateCommandController.php @@ -39,7 +39,7 @@ class DateCommandController extends Command { /** - * @var \EP\EpProducts\Service\DateImportService + * @var DateImportService */ protected $dateImportService; diff --git a/packages/ep_products/Classes/ContentFeed/ManifestBuilder.php b/packages/ep_products/Classes/ContentFeed/ManifestBuilder.php index 32fe25c..621843b 100644 --- a/packages/ep_products/Classes/ContentFeed/ManifestBuilder.php +++ b/packages/ep_products/Classes/ContentFeed/ManifestBuilder.php @@ -280,9 +280,7 @@ class ManifestBuilder 'MAX(tstamp) AS tstamp', "SUM(CASE WHEN deleted = 0 AND hidden = 0 AND CType <> 'list' THEN 1 ELSE 0 END) AS text_elements" ) - ->from('tt_content') - ->groupBy('pid', 'sys_language_uid') - ->execute() + ->from('tt_content')->groupBy('pid', 'sys_language_uid')->executeQuery() ->fetchAllAssociative() ; diff --git a/packages/ep_products/Classes/ContentFeed/PageTree.php b/packages/ep_products/Classes/ContentFeed/PageTree.php index b2d1b0c..60844a5 100644 --- a/packages/ep_products/Classes/ContentFeed/PageTree.php +++ b/packages/ep_products/Classes/ContentFeed/PageTree.php @@ -108,9 +108,7 @@ class PageTree $rows = $queryBuilder ->select(...self::FIELDS) - ->from('pages') - ->orderBy('sorting') - ->execute() + ->from('pages')->orderBy('sorting')->executeQuery() ->fetchAllAssociative() ; diff --git a/packages/ep_products/Classes/ContentFeed/RecordFinder.php b/packages/ep_products/Classes/ContentFeed/RecordFinder.php index a69c1f8..9de30d4 100644 --- a/packages/ep_products/Classes/ContentFeed/RecordFinder.php +++ b/packages/ep_products/Classes/ContentFeed/RecordFinder.php @@ -86,9 +86,7 @@ class RecordFinder $rows = $queryBuilder ->selectLiteral('mm.uid_local AS product', 'MAX(faq.tstamp) AS tstamp') ->from('tx_epproducts_product_faq_mm', 'mm') - ->join('mm', 'tx_epproducts_domain_model_faq', 'faq', 'faq.uid = mm.uid_foreign') - ->groupBy('mm.uid_local') - ->execute() + ->join('mm', 'tx_epproducts_domain_model_faq', 'faq', 'faq.uid = mm.uid_foreign')->groupBy('mm.uid_local')->executeQuery() ->fetchAllAssociative() ; @@ -109,9 +107,7 @@ class RecordFinder $rows = $queryBuilder ->selectLiteral('entity AS hotel', 'MAX(tstamp) AS tstamp') ->from('tx_epproducts_domain_model_matchcode') - ->where($queryBuilder->expr()->eq('entity_type', $queryBuilder->createNamedParameter('hotel'))) - ->groupBy('entity') - ->execute() + ->where($queryBuilder->expr()->eq('entity_type', $queryBuilder->createNamedParameter('hotel')))->groupBy('entity')->executeQuery() ->fetchAllAssociative() ; @@ -138,7 +134,7 @@ class RecordFinder if ('product' === $type) { // A product that is neither searchable nor bookable is an internal record. - $queryBuilder->andWhere($expr->orX($expr->eq('searchable', 1), $expr->eq('bookable', 1))); + $queryBuilder->andWhere($expr->or($expr->eq('searchable', 1), $expr->eq('bookable', 1))); } if ('news' === $type) { diff --git a/packages/ep_products/Classes/ContentFeed/RecordSerializer.php b/packages/ep_products/Classes/ContentFeed/RecordSerializer.php index 2ed22cc..e725eef 100644 --- a/packages/ep_products/Classes/ContentFeed/RecordSerializer.php +++ b/packages/ep_products/Classes/ContentFeed/RecordSerializer.php @@ -309,9 +309,7 @@ class RecordSerializer ->select($keyField, $valueField) ->from($table) ->where($queryBuilder->expr()->in($keyField, $queryBuilder->createNamedParameter($uids, Connection::PARAM_INT_ARRAY))) - ->orderBy($keyField) - ->addOrderBy($sortField) - ->execute() + ->orderBy($keyField)->addOrderBy($sortField)->executeQuery() ->fetchAllAssociative() ; @@ -336,9 +334,7 @@ class RecordSerializer ->from('tx_epproducts_domain_model_faq', 'faq') ->join('faq', 'tx_epproducts_product_faq_mm', 'mm', 'mm.uid_foreign = faq.uid') ->where($queryBuilder->expr()->in('mm.uid_local', $queryBuilder->createNamedParameter($productUids, Connection::PARAM_INT_ARRAY))) - ->orderBy('mm.uid_local') - ->addOrderBy('mm.sorting') - ->execute() + ->orderBy('mm.uid_local')->addOrderBy('mm.sorting')->executeQuery() ->fetchAllAssociative() ; @@ -371,9 +367,7 @@ class RecordSerializer ->where( $queryBuilder->expr()->eq('entity_type', $queryBuilder->createNamedParameter('hotel')), $queryBuilder->expr()->in('entity', $queryBuilder->createNamedParameter($hotelUids, Connection::PARAM_INT_ARRAY)) - ) - ->orderBy('code') - ->execute() + )->orderBy('code')->executeQuery() ->fetchAllAssociative() ; @@ -401,9 +395,7 @@ class RecordSerializer $queryBuilder = $this->connectionPool->getQueryBuilderForTable('tx_epproducts_domain_model_infobox'); $rows = $queryBuilder ->select('uid', 'text') - ->from('tx_epproducts_domain_model_infobox') - ->where($queryBuilder->expr()->in('uid', $queryBuilder->createNamedParameter(array_unique($infoboxUids), Connection::PARAM_INT_ARRAY))) - ->execute() + ->from('tx_epproducts_domain_model_infobox')->where($queryBuilder->expr()->in('uid', $queryBuilder->createNamedParameter(array_unique($infoboxUids), Connection::PARAM_INT_ARRAY)))->executeQuery() ->fetchAllAssociative() ; @@ -425,9 +417,7 @@ class RecordSerializer $queryBuilder = $this->connectionPool->getQueryBuilderForTable('tx_epproducts_domain_model_webcam'); $url = $queryBuilder ->select('url') - ->from('tx_epproducts_domain_model_webcam') - ->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($webcamUid, \PDO::PARAM_INT))) - ->execute() + ->from('tx_epproducts_domain_model_webcam')->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($webcamUid, Connection::PARAM_INT)))->executeQuery() ->fetchOne() ; @@ -445,9 +435,7 @@ class RecordSerializer ->select('mm.uid_local AS news', 'tag.title') ->from('tx_news_domain_model_tag', 'tag') ->join('tag', 'tx_news_domain_model_news_tag_mm', 'mm', 'mm.uid_foreign = tag.uid') - ->where($queryBuilder->expr()->in('mm.uid_local', $queryBuilder->createNamedParameter($newsUids, Connection::PARAM_INT_ARRAY))) - ->orderBy('mm.sorting') - ->execute() + ->where($queryBuilder->expr()->in('mm.uid_local', $queryBuilder->createNamedParameter($newsUids, Connection::PARAM_INT_ARRAY)))->orderBy('mm.sorting')->executeQuery() ->fetchAllAssociative() ; @@ -475,9 +463,7 @@ class RecordSerializer $queryBuilder->expr()->eq('mm.tablenames', $queryBuilder->createNamedParameter('tx_news_domain_model_news')), $queryBuilder->expr()->eq('mm.fieldname', $queryBuilder->createNamedParameter('categories')), $queryBuilder->expr()->in('mm.uid_foreign', $queryBuilder->createNamedParameter($newsUids, Connection::PARAM_INT_ARRAY)) - ) - ->orderBy('mm.sorting_foreign') - ->execute() + )->orderBy('mm.sorting_foreign')->executeQuery() ->fetchAllAssociative() ; diff --git a/packages/ep_products/Classes/Controller/AjaxTableController.php b/packages/ep_products/Classes/Controller/AjaxTableController.php index 8b3cdc1..6b4f761 100644 --- a/packages/ep_products/Classes/Controller/AjaxTableController.php +++ b/packages/ep_products/Classes/Controller/AjaxTableController.php @@ -26,7 +26,9 @@ namespace EP\EpProducts\Controller; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - +use Psr\Http\Message\ResponseInterface; +use TYPO3\CMS\Extbase\Http\ForwardResponse; +use EP\EpProducts\Domain\Model\Infobox; use EP\EpProducts\Domain\Model\Date; use EP\EpProducts\Domain\Model\Hotel; use EP\EpProducts\Domain\Model\Product; @@ -59,7 +61,7 @@ class AjaxTableController extends ActionController protected $infoboxRepository; /** - * @var \EP\EpProducts\Service\FilterService + * @var FilterService */ protected $filterService; @@ -133,12 +135,12 @@ class AjaxTableController extends ActionController Hotel $hotel, string $dateFrom = null, string $dateTo = null - ): void { + ): ResponseInterface { $forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true); $filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids); $filterSettings['dateFrom'] = $dateFrom; $filterSettings['dateTo'] = $dateTo; - $paCode = GeneralUtility::_GET('pa'); + $paCode = $this->request->getQueryParams()['pa'] ?? null; $myEpUrl = $this->myEpUrlResolverService->resolve(); $dates = $this->dateService->getDatesTable([ @@ -149,18 +151,13 @@ class AjaxTableController extends ActionController if (1 === count($dates)) { $date = reset($dates); - $this->forward( - 'pricetable', - null, - 'ep_products', - [ - 'product' => $product, - 'hotel' => $hotel, - 'date' => $date['dateUid'], - 'paCode' => $paCode, - 'singleDate' => true, - ] - ); + return (new ForwardResponse('pricetable'))->withExtensionName('ep_products')->withArguments([ + 'product' => $product, + 'hotel' => $hotel, + 'date' => $date['dateUid'], + 'paCode' => $paCode, + 'singleDate' => true, + ]); } $nonBookableDateUids = GeneralUtility::trimExplode(',', $product->getNonBookableDates(), true); @@ -221,6 +218,7 @@ class AjaxTableController extends ActionController 'nonBookableInfo' => $nonBookableInfo, 'myEpUrl' => $myEpUrl, ]); + return $this->htmlResponse(); } /** @@ -234,7 +232,7 @@ class AjaxTableController extends ActionController Hotel $hotel, Date $date, bool $singleDate = false - ): void { + ): ResponseInterface { $forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true); $filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids); $myEpUrl = $this->myEpUrlResolverService->resolve(); @@ -245,7 +243,7 @@ class AjaxTableController extends ActionController 'filterSettings' => $filterSettings, 'date' => $date, 'myEpUrl' => $myEpUrl, - 'paCode' => GeneralUtility::_GET('pa'), + 'paCode' => $this->request->getQueryParams()['pa'] ?? null, ]); $hasSurchargeOrDiscount = $this->dateService->checkSurcharcheOrDiscount($priceTable); $hasIncludedServices = $this->dateService->hasIncludedServices($priceTable); @@ -274,13 +272,14 @@ class AjaxTableController extends ActionController 'nonBookableInfo' => $nonBookableInfo, 'myEpUrl' => $myEpUrl, ]); + return $this->htmlResponse(); } /** * @param Product $product * @param Hotel $hotel */ - public function pricetableHtmlAction(Product $product, Hotel $hotel): void + public function pricetableHtmlAction(Product $product, Hotel $hotel): ResponseInterface { $nonBookableInfo = $this->getNonBookableInfobox($product); $myEpUrl = $this->myEpUrlResolverService->resolve(); @@ -290,7 +289,7 @@ class AjaxTableController extends ActionController 'hotel' => $hotel, 'filterSettings' => $this->filterService->getNormalizedFilterSettings(), 'myEpUrl' => $myEpUrl, - 'paCode' => GeneralUtility::_GET('pa'), + 'paCode' => $this->request->getQueryParams()['pa'] ?? null, 'sortByRoom' => true, ]); $hasIncludedServices = $this->dateService->hasIncludedServices($priceTable); @@ -301,12 +300,13 @@ class AjaxTableController extends ActionController 'nonBookableInfo' => $nonBookableInfo, 'myEpUrl' => $myEpUrl, ]); + return $this->htmlResponse(); } /** * @param Product $product */ - public function eventPricetableAction(Product $product): void + public function eventPricetableAction(Product $product): ResponseInterface { $roomTypes = GeneralUtility::trimExplode(',', $this->settings['priceTableRoomTypes']); $roomTypesPax = array_map(function ($type) { @@ -340,6 +340,7 @@ class AjaxTableController extends ActionController 'nonBookableInfo' => $nonBookableInfo, 'myEpUrl' => $myEpUrl, ]); + return $this->htmlResponse(); } /** @@ -353,7 +354,7 @@ class AjaxTableController extends ActionController Product $product, string $dateFrom, string $dateTo - ): void { + ): ResponseInterface { $period = new Period($dateFrom, $dateTo); $nights = (int) $period->dateInterval()->format('%a') + 1; $myEpUrl = $this->myEpUrlResolverService->resolve(); @@ -369,11 +370,12 @@ class AjaxTableController extends ActionController $this->view->assign('nights', $nights); $this->view->assign('rooms', $rooms); $this->view->assign('myEpUrl', $myEpUrl); + return $this->htmlResponse(); } /** * @param Product $product - * @return \EP\EpProducts\Domain\Model\Infobox + * @return Infobox */ protected function getNonBookableInfobox(Product $product) { diff --git a/packages/ep_products/Classes/Controller/AjaxTeaserPopupController.php b/packages/ep_products/Classes/Controller/AjaxTeaserPopupController.php index a97b2e3..c972d80 100644 --- a/packages/ep_products/Classes/Controller/AjaxTeaserPopupController.php +++ b/packages/ep_products/Classes/Controller/AjaxTeaserPopupController.php @@ -2,16 +2,18 @@ namespace EP\EpProducts\Controller; +use Psr\Http\Message\ResponseInterface; use EP\EpProducts\Domain\Model\Concept; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class AjaxTeaserPopupController extends ActionController { - public function conceptAction(Concept $concept, string $targetUrl) + public function conceptAction(Concept $concept, string $targetUrl): ResponseInterface { $this->view->assignMultiple([ 'concept' => $concept, 'targetUrl' => $targetUrl, ]); + return $this->htmlResponse(); } } diff --git a/packages/ep_products/Classes/Controller/ProductController.php b/packages/ep_products/Classes/Controller/ProductController.php index efb7411..0429a6b 100644 --- a/packages/ep_products/Classes/Controller/ProductController.php +++ b/packages/ep_products/Classes/Controller/ProductController.php @@ -26,7 +26,8 @@ namespace EP\EpProducts\Controller; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - +use TYPO3\CMS\Extbase\Http\ForwardResponse; +use Psr\Http\Message\ResponseInterface; use EP\EpProducts\Domain\Model\Hotel; use EP\EpProducts\Domain\Model\Product; use EP\EpProducts\Domain\Repository\HotelRepository; @@ -45,22 +46,22 @@ class ProductController extends ActionController { /** - * @var \EP\EpProducts\Domain\Repository\ProductRepository + * @var ProductRepository */ protected $productRepository; /** - * @var \EP\EpProducts\Domain\Repository\HotelRepository + * @var HotelRepository */ protected $hotelRepository; /** - * @var \EP\EpProducts\Service\FilterService + * @var FilterService */ protected $filterService; /** - * @var \EP\EpProducts\Service\ProductDataService + * @var ProductDataService */ protected $productDataService; @@ -134,7 +135,7 @@ class ProductController extends ActionController Hotel $hotel = null, $dateFrom = null, $dateTo = null - ): void { + ) { // Get product to display from flexform settings if not provided via url if ($product === null) { $productUid = $this->settings['productUid']; @@ -143,7 +144,7 @@ class ProductController extends ActionController // Redirect to search page in case no product can be determined if ($product === null) { $filterSettings = $this->filterService->getNormalizedFilterSettings(); - $this->redirect( + return $this->redirect( 'searchresult', 'Search', null, @@ -162,7 +163,7 @@ class ProductController extends ActionController $arguments = [ 'product' => $product, ]; - $this->forward('hotelList', null, null, $arguments); + return (new ForwardResponse('hotelList'))->withArguments($arguments); } // Use first hotel which should be the only one at this point if ($product->getHotels()->count() > 0) { @@ -189,7 +190,7 @@ class ProductController extends ActionController $nonBookableInfo = $product->getNonBookableInfo(); // Assemble backlink - $backlinkUrl = GeneralUtility::_GET('ref'); + $backlinkUrl = $this->request->getQueryParams()['ref'] ?? null; $backLinkLabel = strpos($backlinkUrl, 'suche') !== -1 ? 'zurück zum Suchergebnis' : 'zurück'; $this->view->assignMultiple([ @@ -199,7 +200,7 @@ class ProductController extends ActionController 'isProductWithExcludedConcept' => $isProductWithExcludedConcept, 'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept, 'isProductWithGroupInquiryForm' => $isProductWithGroupInquiryForm, - 'currentPageUid' => $GLOBALS['TSFE']->id, + 'currentPageUid' => $this->request->getAttribute('frontend.page.information')->getId(), 'dateFrom' => $dateFrom, 'dateTo' => $dateTo, 'referringUrl' => $backlinkUrl, @@ -209,13 +210,13 @@ class ProductController extends ActionController ]); } - public function pricetableAction(): void + public function pricetableAction(): ResponseInterface { $productUid = $this->settings['productUid']; - /** @var \EP\EpProducts\Domain\Model\Product $product */ + /** @var Product $product */ $product = $this->productRepository->findByIdentifier($productUid); $hotelUid = $this->settings['hotelUid']; - /** @var \EP\EpProducts\Domain\Model\Hotel $hotel */ + /** @var Hotel $hotel */ $hotel = $this->hotelRepository->findByIdentifier($hotelUid); $pricetable = $this->dateService->getPriceTable([ 'product' => $product, @@ -223,12 +224,13 @@ class ProductController extends ActionController 'filterSettings' => $this->filterService->getNormalizedFilterSettings(), ]); $this->view->assign('pricetable', $pricetable); + return $this->htmlResponse(); } /** * @param Product $product */ - public function hotelListAction(Product $product): void + public function hotelListAction(Product $product): ResponseInterface { $hotels = $this->hotelDataService->getList($product); $this->view->assignMultiple([ @@ -236,9 +238,10 @@ class ProductController extends ActionController 'product' => $product, 'linkHotel' => true, ]); + return $this->htmlResponse(); } - public function teasergroupAction(): void + public function teasergroupAction(): ResponseInterface { $filterSettings = $this->filterService->getFiltersettingsFromSettings($this->settings); $dateAuto = !$this->settings['dateFrom'] && !$this->settings['dateTo']; @@ -247,7 +250,7 @@ class ProductController extends ActionController $teasers = $this->productDataService->getTeasergroup($filterSettings, $excludedConceptUids, $limit); $dateFrom = $this->settings['dateFrom'] ? date('Y-m-d', $this->settings['dateFrom']) : null; $dateTo = $this->settings['dateTo'] ? date('Y-m-d', $this->settings['dateTo']) : null; - $data = $this->configurationManager->getContentObject()->data; + $data = $this->request->getAttribute('currentContentObject')->data; $nonBookableInfo = $this->settings['infoboxUid'] ? $this->infoboxRepository->findByUid($this->settings['infoboxUid']) : $this->infoboxRepository->getDefault(); $this->view->assign('data', $data); @@ -257,5 +260,6 @@ class ProductController extends ActionController $this->view->assign('dateFrom', $dateFrom); $this->view->assign('dateTo', $dateTo); $this->view->assign('nonBookableInfo', $nonBookableInfo); + return $this->htmlResponse(); } } diff --git a/packages/ep_products/Classes/Domain/Model/AbstractDestination.php b/packages/ep_products/Classes/Domain/Model/AbstractDestination.php index 35413e0..47a7aeb 100644 --- a/packages/ep_products/Classes/Domain/Model/AbstractDestination.php +++ b/packages/ep_products/Classes/Domain/Model/AbstractDestination.php @@ -2,6 +2,10 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; +use TYPO3\CMS\Extbase\Persistence\ObjectStorage; +use TYPO3\CMS\Extbase\Domain\Model\FileReference; + /*************************************************************** * * Copyright notice @@ -26,8 +30,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class AbstractDestination extends AbstractEntity { const SEASON_WINTER = 'w'; @@ -99,17 +102,17 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $descriptionExtended = ''; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $images; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $teaserImages; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $headerImages; @@ -120,9 +123,9 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected function initStorageObjects() { - $this->images = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->teaserImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->headerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); + $this->images = new ObjectStorage(); + $this->teaserImages = new ObjectStorage(); + $this->headerImages = new ObjectStorage(); } /** @@ -344,7 +347,7 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images + * @return ObjectStorage $images */ public function getImages() { @@ -352,15 +355,15 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images + * @param ObjectStorage $images */ - public function setImages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $images) + public function setImages(ObjectStorage $images) { $this->images = $images; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getTeaserImages() { @@ -368,7 +371,7 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return null|ObjectStorage */ public function getTeaserImage() { @@ -380,7 +383,7 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teaserImages + * @param ObjectStorage $teaserImages */ public function setTeaserImages($teaserImages) { @@ -388,7 +391,7 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getHeaderImages() { @@ -396,7 +399,7 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @return null|\TYPO3\CMS\Extbase\Domain\Model\FileReference + * @return null|FileReference */ public function getHeaderImage() { @@ -410,7 +413,7 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $headerImages + * @param ObjectStorage $headerImages */ public function setHeaderImages($headerImages) { diff --git a/packages/ep_products/Classes/Domain/Model/Badge.php b/packages/ep_products/Classes/Domain/Model/Badge.php index 65cc14c..64231be 100644 --- a/packages/ep_products/Classes/Domain/Model/Badge.php +++ b/packages/ep_products/Classes/Domain/Model/Badge.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; + /*************************************************************** * * Copyright notice @@ -26,8 +28,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Badge extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Badge extends AbstractEntity { /** diff --git a/packages/ep_products/Classes/Domain/Model/City.php b/packages/ep_products/Classes/Domain/Model/City.php index f8c3010..8a76f30 100644 --- a/packages/ep_products/Classes/Domain/Model/City.php +++ b/packages/ep_products/Classes/Domain/Model/City.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\Persistence\ObjectStorage; + /*************************************************************** * * Copyright notice @@ -26,7 +28,6 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - class City extends AbstractDestination implements TeaserInterface { @@ -46,29 +47,29 @@ class City extends AbstractDestination implements TeaserInterface protected $leisure = ''; /** - * @var \EP\EpProducts\Domain\Model\Country + * @var Country */ protected $country; /** - * @var \EP\EpProducts\Domain\Model\Region + * @var Region */ protected $region; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> + * @var ObjectStorage */ protected $facts; /** - * @var \EP\EpProducts\Domain\Model\Officetip + * @var Officetip */ protected $officetip; protected function initStorageObjects() { parent::initStorageObjects(); - $this->facts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); + $this->facts = new ObjectStorage(); } /** @@ -119,7 +120,7 @@ class City extends AbstractDestination implements TeaserInterface * Returns all header images with fallback to parent * region in case none are assigned. * - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getHeaderImages() { @@ -133,7 +134,7 @@ class City extends AbstractDestination implements TeaserInterface } /** - * @return \EP\EpProducts\Domain\Model\Country $country + * @return Country $country */ public function getCountry() { @@ -141,15 +142,15 @@ class City extends AbstractDestination implements TeaserInterface } /** - * @param \EP\EpProducts\Domain\Model\Country $country + * @param Country $country */ - public function setCountry(\EP\EpProducts\Domain\Model\Country $country) + public function setCountry(Country $country) { $this->country = $country; } /** - * @return \EP\EpProducts\Domain\Model\Region $region + * @return Region $region */ public function getRegion() { @@ -157,15 +158,15 @@ class City extends AbstractDestination implements TeaserInterface } /** - * @param \EP\EpProducts\Domain\Model\Region $region + * @param Region $region */ - public function setRegion(\EP\EpProducts\Domain\Model\Region $region) + public function setRegion(Region $region) { $this->region = $region; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts + * @return ObjectStorage $facts */ public function getFacts() { @@ -173,9 +174,9 @@ class City extends AbstractDestination implements TeaserInterface } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts + * @param ObjectStorage $facts */ - public function setFacts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts) + public function setFacts(ObjectStorage $facts) { $this->facts = $facts; } diff --git a/packages/ep_products/Classes/Domain/Model/Concept.php b/packages/ep_products/Classes/Domain/Model/Concept.php index 6878b57..8779c82 100644 --- a/packages/ep_products/Classes/Domain/Model/Concept.php +++ b/packages/ep_products/Classes/Domain/Model/Concept.php @@ -2,6 +2,10 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; +use TYPO3\CMS\Extbase\Persistence\ObjectStorage; +use TYPO3\CMS\Extbase\Domain\Model\FileReference; + /*************************************************************** * * Copyright notice @@ -26,8 +30,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements TeaserInterface +class Concept extends AbstractEntity implements TeaserInterface { /** @@ -96,22 +99,22 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements protected $detailPage; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $teaserImages; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $headerImages; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $images; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product> + * @var ObjectStorage */ protected $products; @@ -127,10 +130,10 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements */ protected function initStorageObjects() { - $this->products = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->teaserImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->headerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->images = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); + $this->products = new ObjectStorage(); + $this->teaserImages = new ObjectStorage(); + $this->headerImages = new ObjectStorage(); + $this->images = new ObjectStorage(); } /** @@ -328,7 +331,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getTeaserImages() { @@ -336,7 +339,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return null|ObjectStorage */ public function getTeaserImage() { @@ -348,7 +351,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teaserImages + * @param ObjectStorage $teaserImages */ public function setTeaserImages($teaserImages) { @@ -356,7 +359,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getHeaderImages() { @@ -364,7 +367,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return null|ObjectStorage */ public function getHeaderImage() { @@ -376,7 +379,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $headerImages + * @param ObjectStorage $headerImages */ public function setHeaderImages($headerImages) { @@ -384,7 +387,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getImages() { @@ -392,7 +395,7 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $images + * @param ObjectStorage $images */ public function setImages($images) { @@ -400,23 +403,23 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \EP\EpProducts\Domain\Model\Product $product + * @param Product $product */ - public function addProduct(\EP\EpProducts\Domain\Model\Product $product) + public function addProduct(Product $product) { $this->products->attach($product); } /** - * @param \EP\EpProducts\Domain\Model\Product $product + * @param Product $product */ - public function removeProduct(\EP\EpProducts\Domain\Model\Product $product) + public function removeProduct(Product $product) { $this->products->detach($product); } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product> + * @return ObjectStorage */ public function getProducts() { @@ -424,9 +427,9 @@ class Concept extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product> $products + * @param ObjectStorage $products */ - public function setProducts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $products) + public function setProducts(ObjectStorage $products) { $this->products = $products; } diff --git a/packages/ep_products/Classes/Domain/Model/Contingent.php b/packages/ep_products/Classes/Domain/Model/Contingent.php index a6a681a..9687490 100644 --- a/packages/ep_products/Classes/Domain/Model/Contingent.php +++ b/packages/ep_products/Classes/Domain/Model/Contingent.php @@ -43,7 +43,7 @@ class Contingent extends AbstractEntity implements EventInterface protected $date; /** - * @var \EP\EpProducts\Domain\Model\Hotel + * @var Hotel */ protected $hotel; diff --git a/packages/ep_products/Classes/Domain/Model/Country.php b/packages/ep_products/Classes/Domain/Model/Country.php index 043dcaf..81e47ef 100644 --- a/packages/ep_products/Classes/Domain/Model/Country.php +++ b/packages/ep_products/Classes/Domain/Model/Country.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\Persistence\ObjectStorage; + /*************************************************************** * * Copyright notice @@ -26,7 +28,6 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - class Country extends AbstractDestination implements TeaserInterface { @@ -41,24 +42,24 @@ class Country extends AbstractDestination implements TeaserInterface protected $descriptionExtended = ''; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> + * @var ObjectStorage */ protected $facts; /** - * @var \EP\EpProducts\Domain\Model\Officetip + * @var Officetip */ protected $officetip; /** - * @var \EP\EpProducts\Domain\Model\Snowreport + * @var Snowreport */ protected $snowreport; protected function initStorageObjects() { parent::initStorageObjects(); - $this->facts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); + $this->facts = new ObjectStorage(); } /** @@ -92,23 +93,23 @@ class Country extends AbstractDestination implements TeaserInterface } /** - * @param \EP\EpProducts\Domain\Model\Fact $fact + * @param Fact $fact */ - public function addFact(\EP\EpProducts\Domain\Model\Fact $fact) + public function addFact(Fact $fact) { $this->facts->attach($fact); } /** - * @param \EP\EpProducts\Domain\Model\Fact $factToRemove + * @param Fact $factToRemove */ - public function removeFact(\EP\EpProducts\Domain\Model\Fact $factToRemove) + public function removeFact(Fact $factToRemove) { $this->facts->detach($factToRemove); } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> + * @return ObjectStorage */ public function getFacts() { @@ -116,9 +117,9 @@ class Country extends AbstractDestination implements TeaserInterface } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts + * @param ObjectStorage $facts */ - public function setFacts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts) + public function setFacts(ObjectStorage $facts) { $this->facts = $facts; } diff --git a/packages/ep_products/Classes/Domain/Model/Date.php b/packages/ep_products/Classes/Domain/Model/Date.php index c7b38eb..6e8c13c 100644 --- a/packages/ep_products/Classes/Domain/Model/Date.php +++ b/packages/ep_products/Classes/Domain/Model/Date.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; + /*************************************************************** * * Copyright notice @@ -26,8 +28,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Date extends AbstractEntity { /** * @var Product diff --git a/packages/ep_products/Classes/Domain/Model/Dto/NewsletterSubscriptionRequest.php b/packages/ep_products/Classes/Domain/Model/Dto/NewsletterSubscriptionRequest.php index 2a976ce..efd20be 100644 --- a/packages/ep_products/Classes/Domain/Model/Dto/NewsletterSubscriptionRequest.php +++ b/packages/ep_products/Classes/Domain/Model/Dto/NewsletterSubscriptionRequest.php @@ -2,35 +2,28 @@ namespace EP\EpProducts\Domain\Model\Dto; +use TYPO3\CMS\Extbase\Annotation\Validate; use JsonSerializable; class NewsletterSubscriptionRequest implements JsonSerializable { - /** - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ + #[Validate(['validator' => 'NotEmpty'])] private ?string $firstName = null; - /** - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ + #[Validate(['validator' => 'NotEmpty'])] private ?string $lastName = null; - /** - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - * @TYPO3\CMS\Extbase\Annotation\Validate("EmailAddress") - */ + #[Validate(['validator' => 'NotEmpty'])] + #[Validate(['validator' => 'EmailAddress'])] private ?string $email = null; /** * @var list - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") */ + #[Validate(['validator' => 'NotEmpty'])] private array $listIds = []; - /** - * @TYPO3\CMS\Extbase\Annotation\Validate("Boolean", options={"is": true}) - */ + #[Validate(['validator' => 'Boolean', 'options' => ['is' => true]])] private bool $consent = false; public function getFirstName(): ?string diff --git a/packages/ep_products/Classes/Domain/Model/Fact.php b/packages/ep_products/Classes/Domain/Model/Fact.php index 79207cd..b690b3d 100644 --- a/packages/ep_products/Classes/Domain/Model/Fact.php +++ b/packages/ep_products/Classes/Domain/Model/Fact.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; + /*************************************************************** * * Copyright notice @@ -26,8 +28,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Fact extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Fact extends AbstractEntity { /** diff --git a/packages/ep_products/Classes/Domain/Model/Faq.php b/packages/ep_products/Classes/Domain/Model/Faq.php index ab8bd89..a21f083 100644 --- a/packages/ep_products/Classes/Domain/Model/Faq.php +++ b/packages/ep_products/Classes/Domain/Model/Faq.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; + /*************************************************************** * * Copyright notice @@ -26,8 +28,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Faq extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Faq extends AbstractEntity { /** diff --git a/packages/ep_products/Classes/Domain/Model/Hotel.php b/packages/ep_products/Classes/Domain/Model/Hotel.php index 097fbe8..93ed74d 100644 --- a/packages/ep_products/Classes/Domain/Model/Hotel.php +++ b/packages/ep_products/Classes/Domain/Model/Hotel.php @@ -26,7 +26,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - +use TYPO3\CMS\Extbase\Annotation\ORM\Lazy; use EP\EpProducts\Utility\HotelIconUtility; use TYPO3\CMS\Extbase\Domain\Model\FileReference; use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; @@ -197,8 +197,8 @@ class Hotel extends AbstractEntity implements TeaserInterface /** * @var ObjectStorage - * @TYPO3\CMS\Extbase\Annotation\ORM\Lazy */ + #[Lazy] protected $additionalCodes; /** diff --git a/packages/ep_products/Classes/Domain/Model/Journey.php b/packages/ep_products/Classes/Domain/Model/Journey.php index cc54f3b..bce83bb 100644 --- a/packages/ep_products/Classes/Domain/Model/Journey.php +++ b/packages/ep_products/Classes/Domain/Model/Journey.php @@ -2,6 +2,9 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; +use TYPO3\CMS\Extbase\Domain\Model\FileReference; + /*************************************************************** * * Copyright notice @@ -26,8 +29,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Journey extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Journey extends AbstractEntity { /** @@ -46,7 +48,7 @@ class Journey extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $byBus; /** - * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @var FileReference */ protected $image; @@ -99,7 +101,7 @@ class Journey extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @return FileReference */ public function getImage() { @@ -107,7 +109,7 @@ class Journey extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image + * @param FileReference $image */ public function setImage($image) { diff --git a/packages/ep_products/Classes/Domain/Model/MatchCode.php b/packages/ep_products/Classes/Domain/Model/MatchCode.php index d0d06ea..8a6fc8a 100644 --- a/packages/ep_products/Classes/Domain/Model/MatchCode.php +++ b/packages/ep_products/Classes/Domain/Model/MatchCode.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; + /*************************************************************** * * Copyright notice @@ -26,8 +28,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class MatchCode extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class MatchCode extends AbstractEntity { /** diff --git a/packages/ep_products/Classes/Domain/Model/Officetip.php b/packages/ep_products/Classes/Domain/Model/Officetip.php index fa00363..ebeaf53 100644 --- a/packages/ep_products/Classes/Domain/Model/Officetip.php +++ b/packages/ep_products/Classes/Domain/Model/Officetip.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; + /*************************************************************** * * Copyright notice @@ -26,8 +28,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Officetip extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Officetip extends AbstractEntity { /** @@ -41,7 +42,7 @@ class Officetip extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $text = ''; /** - * @var \EP\EpProducts\Domain\Model\Teammember + * @var Teammember */ protected $author; diff --git a/packages/ep_products/Classes/Domain/Model/Product.php b/packages/ep_products/Classes/Domain/Model/Product.php index d268f7f..f48573c 100644 --- a/packages/ep_products/Classes/Domain/Model/Product.php +++ b/packages/ep_products/Classes/Domain/Model/Product.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; +use TYPO3\CMS\Extbase\Persistence\ObjectStorage; use TYPO3\CMS\Extbase\Domain\Model\FileReference; /*************************************************************** @@ -29,7 +31,7 @@ use TYPO3\CMS\Extbase\Domain\Model\FileReference; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements TeaserInterface +class Product extends AbstractEntity implements TeaserInterface { /** @@ -188,22 +190,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements protected $testimonials = ''; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $images; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $resellerImages; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $teaserImages; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $headerImages; @@ -213,57 +215,57 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements protected $tourThumbnail; /** - * @var \EP\EpProducts\Domain\Model\Concept + * @var Concept */ protected $concept; /** - * @var \EP\EpProducts\Domain\Model\Country + * @var Country */ protected $country; /** - * @var \EP\EpProducts\Domain\Model\Region + * @var Region */ protected $region; /** - * @var \EP\EpProducts\Domain\Model\City + * @var City */ protected $city; /** - * @var \EP\EpProducts\Domain\Model\Journey + * @var Journey */ protected $journey; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> + * @var ObjectStorage */ protected $facts; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Hotel> + * @var ObjectStorage */ protected $hotels; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Faq> + * @var ObjectStorage */ protected $faqs; /** - * @var \EP\EpProducts\Domain\Model\Officetip + * @var Officetip */ protected $officetip; /** - * @var \EP\EpProducts\Domain\Model\Hotel + * @var Hotel */ protected $calendarHotel; /** - * @var \EP\EpProducts\Domain\Model\Product + * @var Product */ protected $altProduct; @@ -278,12 +280,12 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements protected $video = ''; /** - * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @var FileReference */ protected $banner; /** - * @var \EP\EpProducts\Domain\Model\Badge + * @var Badge */ protected $badge; @@ -298,7 +300,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements protected $minPrice; /** - * @var \EP\EpProducts\Domain\Model\Infobox + * @var Infobox */ protected $nonBookableInfo; @@ -309,12 +311,12 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements protected function initStorageObjects() { - $this->images = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->teaserImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->headerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->facts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->hotels = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->faqs = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); + $this->images = new ObjectStorage(); + $this->teaserImages = new ObjectStorage(); + $this->headerImages = new ObjectStorage(); + $this->facts = new ObjectStorage(); + $this->hotels = new ObjectStorage(); + $this->faqs = new ObjectStorage(); } /** @@ -790,9 +792,9 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images + * @param ObjectStorage $images */ - public function setImages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $images) + public function setImages(ObjectStorage $images) { $this->images = $images; } @@ -810,15 +812,15 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images + * @param ObjectStorage $images */ - public function setResellerImages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $images) + public function setResellerImages(ObjectStorage $images) { $this->resellerImages = $images; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getTeaserImages() { @@ -826,7 +828,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return null|ObjectStorage */ public function getTeaserImage() { @@ -841,7 +843,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teaserImages + * @param ObjectStorage $teaserImages */ public function setTeaserImages($teaserImages) { @@ -852,7 +854,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements * Returns all header images with fallback to parent * region in case none are assigned. * - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getHeaderImages() { @@ -869,7 +871,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements * Returns a single header image with fallback to parent * region in case none is assigned. * - * @return null|\TYPO3\CMS\Extbase\Domain\Model\FileReference + * @return null|FileReference */ public function getHeaderImage() { @@ -884,7 +886,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $headerImages + * @param ObjectStorage $headerImages */ public function setHeaderImages($headerImages) { @@ -892,7 +894,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return \EP\EpProducts\Domain\Model\Concept $concept + * @return Concept $concept */ public function getConcept() { @@ -900,15 +902,15 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \EP\EpProducts\Domain\Model\Concept $concept + * @param Concept $concept */ - public function setConcepts(\EP\EpProducts\Domain\Model\Concept $concept) + public function setConcepts(Concept $concept) { $this->concept = $concept; } /** - * @return \EP\EpProducts\Domain\Model\Country $country + * @return Country $country */ public function getCountry() { @@ -916,15 +918,15 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \EP\EpProducts\Domain\Model\Country $country + * @param Country $country */ - public function setCountry(\EP\EpProducts\Domain\Model\Country $country) + public function setCountry(Country $country) { $this->country = $country; } /** - * @return \EP\EpProducts\Domain\Model\Region + * @return Region */ public function getRegion() { @@ -932,15 +934,15 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \EP\EpProducts\Domain\Model\Region $region + * @param Region $region */ - public function setRegion(\EP\EpProducts\Domain\Model\Region $region) + public function setRegion(Region $region) { $this->region = $region; } /** - * @return \EP\EpProducts\Domain\Model\City + * @return City */ public function getCity() { @@ -948,15 +950,15 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \EP\EpProducts\Domain\Model\City $city + * @param City $city */ - public function setCity(\EP\EpProducts\Domain\Model\City $city) + public function setCity(City $city) { $this->city = $city; } /** - * @return \EP\EpProducts\Domain\Model\Journey + * @return Journey */ public function getJourney() { @@ -964,7 +966,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \EP\EpProducts\Domain\Model\Journey $journey + * @param Journey $journey */ public function setJourney($journey) { @@ -972,7 +974,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts + * @return ObjectStorage $facts */ public function getFacts() { @@ -980,31 +982,31 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts + * @param ObjectStorage $facts */ - public function setFacts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts) + public function setFacts(ObjectStorage $facts) { $this->facts = $facts; } /** - * @param \EP\EpProducts\Domain\Model\Hotel $hotel + * @param Hotel $hotel */ - public function addHotel(\EP\EpProducts\Domain\Model\Hotel $hotel) + public function addHotel(Hotel $hotel) { $this->hotels->attach($hotel); } /** - * @param \EP\EpProducts\Domain\Model\Hotel $hotel + * @param Hotel $hotel */ - public function removeHotel(\EP\EpProducts\Domain\Model\Hotel $hotel) + public function removeHotel(Hotel $hotel) { $this->hotels->detach($hotel); } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Hotel> $hotels + * @return ObjectStorage $hotels */ public function getHotels() { @@ -1012,24 +1014,24 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Hotel> $hotels + * @param ObjectStorage $hotels */ - public function setHotels(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $hotels) + public function setHotels(ObjectStorage $hotels) { $this->hotels = $hotels; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Faq> + * @return ObjectStorage */ public function getFaqs() { return $this->faqs; } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Faq> $faq + * @param ObjectStorage $faq */ - public function setFaqs(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $faqs) + public function setFaqs(ObjectStorage $faqs) { $this->faqs = $faqs; } @@ -1115,7 +1117,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @return FileReference */ public function getBanner() { @@ -1123,7 +1125,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements } /** - * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $banner + * @param FileReference $banner */ public function setBanner($banner) { diff --git a/packages/ep_products/Classes/Domain/Model/Region.php b/packages/ep_products/Classes/Domain/Model/Region.php index 4f50d29..de0e491 100644 --- a/packages/ep_products/Classes/Domain/Model/Region.php +++ b/packages/ep_products/Classes/Domain/Model/Region.php @@ -2,6 +2,10 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\Annotation\ORM\Cascade; +use TYPO3\CMS\Extbase\Persistence\ObjectStorage; +use TYPO3\CMS\Extbase\Domain\Model\FileReference; + /*************************************************************** * * Copyright notice @@ -26,7 +30,6 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - class Region extends AbstractDestination implements TeaserInterface { @@ -76,50 +79,50 @@ class Region extends AbstractDestination implements TeaserInterface protected $feature = ''; /** - * @var \EP\EpProducts\Domain\Model\Country + * @var Country */ protected $country; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\City> - * @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove") + * @var ObjectStorage */ + #[Cascade(['value' => 'remove'])] protected $cities; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product> - * @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove") + * @var ObjectStorage */ + #[Cascade(['value' => 'remove'])] protected $products; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> + * @var ObjectStorage */ protected $facts; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Hotel> - * @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove") + * @var ObjectStorage */ + #[Cascade(['value' => 'remove'])] protected $hotels; /** - * @var \EP\EpProducts\Domain\Model\Snowreport + * @var Snowreport */ protected $snowreport; /** - * @var \EP\EpProducts\Domain\Model\Webcam + * @var Webcam */ protected $webcam; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @var ObjectStorage */ protected $regionMaps; /** - * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @var FileReference */ protected $awardImage; @@ -136,11 +139,11 @@ class Region extends AbstractDestination implements TeaserInterface protected function initStorageObjects() { parent::initStorageObjects(); - $this->cities = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->products = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->facts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->hotels = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->regionMaps = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); + $this->cities = new ObjectStorage(); + $this->products = new ObjectStorage(); + $this->facts = new ObjectStorage(); + $this->hotels = new ObjectStorage(); + $this->regionMaps = new ObjectStorage(); } /** @@ -279,7 +282,7 @@ class Region extends AbstractDestination implements TeaserInterface * Returns all header images with fallback to parent * country in case none are assigned. * - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getHeaderImages() { @@ -293,7 +296,7 @@ class Region extends AbstractDestination implements TeaserInterface } /** - * @return \EP\EpProducts\Domain\Model\Country $country + * @return Country $country */ public function getCountry() { @@ -301,43 +304,43 @@ class Region extends AbstractDestination implements TeaserInterface } /** - * @param \EP\EpProducts\Domain\Model\Country $country + * @param Country $country */ - public function setCountry(\EP\EpProducts\Domain\Model\Country $country) + public function setCountry(Country $country) { $this->country = $country; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getCities() { return $this->cities; } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $cities + * @param ObjectStorage $cities */ public function setCities($cities) { $this->cities = $cities; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getProducts() { return $this->products; } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $products + * @param ObjectStorage $products */ public function setProducts($products) { $this->products = $products; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts + * @return ObjectStorage $facts */ public function getFacts() { @@ -347,22 +350,22 @@ class Region extends AbstractDestination implements TeaserInterface /** * Sets the facts * - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts + * @param ObjectStorage $facts */ - public function setFacts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts) + public function setFacts(ObjectStorage $facts) { $this->facts = $facts; } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return ObjectStorage */ public function getHotels() { return $this->hotels; } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $hotels + * @param ObjectStorage $hotels */ public function setHotels($hotels) { $this->hotels = $hotels; @@ -410,7 +413,7 @@ class Region extends AbstractDestination implements TeaserInterface } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> + * @return ObjectStorage */ public function getRegionMaps() { @@ -426,7 +429,7 @@ class Region extends AbstractDestination implements TeaserInterface } /** - * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @return FileReference */ public function getAwardImage() { @@ -434,7 +437,7 @@ class Region extends AbstractDestination implements TeaserInterface } /** - * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $awardImage + * @param FileReference $awardImage */ public function setAwardImage($awardImage) { diff --git a/packages/ep_products/Classes/Domain/Model/Reseller.php b/packages/ep_products/Classes/Domain/Model/Reseller.php index 7fbc41d..99b4dff 100644 --- a/packages/ep_products/Classes/Domain/Model/Reseller.php +++ b/packages/ep_products/Classes/Domain/Model/Reseller.php @@ -2,6 +2,7 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; use TYPO3\CMS\Extbase\Annotation\ORM\Lazy; use TYPO3\CMS\Extbase\Persistence\ObjectStorage; @@ -30,7 +31,7 @@ use TYPO3\CMS\Extbase\Persistence\ObjectStorage; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -class Reseller extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Reseller extends AbstractEntity { /** @@ -49,9 +50,9 @@ class Reseller extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $paCode; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product> - * @Lazy() + * @var ObjectStorage */ + #[Lazy] protected $products; public function __construct() diff --git a/packages/ep_products/Classes/Domain/Model/Snowreport.php b/packages/ep_products/Classes/Domain/Model/Snowreport.php index 7497f42..e0b8f6d 100644 --- a/packages/ep_products/Classes/Domain/Model/Snowreport.php +++ b/packages/ep_products/Classes/Domain/Model/Snowreport.php @@ -2,6 +2,7 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; use TYPO3\CMS\Extbase\Persistence\ObjectStorage; /*************************************************************** @@ -29,7 +30,7 @@ use TYPO3\CMS\Extbase\Persistence\ObjectStorage; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -class Snowreport extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Snowreport extends AbstractEntity { /** @@ -98,7 +99,7 @@ class Snowreport extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $lastUpdate; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Webcam> + * @var ObjectStorage */ protected $webcams; @@ -326,23 +327,23 @@ class Snowreport extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @param \EP\EpProducts\Domain\Model\Webcam $webcam + * @param Webcam $webcam */ - public function addWebcam(\EP\EpProducts\Domain\Model\Webcam $webcam) + public function addWebcam(Webcam $webcam) { $this->webcams->attach($webcam); } /** - * @param \EP\EpProducts\Domain\Model\Webcam $webcam + * @param Webcam $webcam */ - public function removeWebcam(\EP\EpProducts\Domain\Model\Webcam $webcam) + public function removeWebcam(Webcam $webcam) { $this->webcams->detach($webcam); } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Webcam> + * @return ObjectStorage */ public function getWebcams() { @@ -350,9 +351,9 @@ class Snowreport extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Webcam> $webcams + * @param ObjectStorage $webcams */ - public function setWebcams(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $webcams) + public function setWebcams(ObjectStorage $webcams) { $this->webcams = $webcams; } diff --git a/packages/ep_products/Classes/Domain/Model/Teammember.php b/packages/ep_products/Classes/Domain/Model/Teammember.php index d7d1fff..5301bfb 100644 --- a/packages/ep_products/Classes/Domain/Model/Teammember.php +++ b/packages/ep_products/Classes/Domain/Model/Teammember.php @@ -2,6 +2,9 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; +use TYPO3\CMS\Extbase\Domain\Model\FileReference; +use TYPO3\CMS\Extbase\Domain\Model\Category; use TYPO3\CMS\Extbase\Persistence\ObjectStorage; /*************************************************************** @@ -29,7 +32,7 @@ use TYPO3\CMS\Extbase\Persistence\ObjectStorage; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -class Teammember extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Teammember extends AbstractEntity { /** @@ -53,7 +56,7 @@ class Teammember extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $tasks = ''; /** - * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @var FileReference */ protected $image; @@ -63,7 +66,7 @@ class Teammember extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $description = ''; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> + * @var ObjectStorage */ protected $categories; @@ -137,7 +140,7 @@ class Teammember extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference + * @return FileReference */ public function getImage() { @@ -145,7 +148,7 @@ class Teammember extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image + * @param FileReference $image */ public function setImage($image) { @@ -169,7 +172,7 @@ class Teammember extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity } /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> + * @return ObjectStorage */ public function getCategories() { diff --git a/packages/ep_products/Classes/Domain/Model/TeaserInterface.php b/packages/ep_products/Classes/Domain/Model/TeaserInterface.php index 33ad37a..b65f853 100644 --- a/packages/ep_products/Classes/Domain/Model/TeaserInterface.php +++ b/packages/ep_products/Classes/Domain/Model/TeaserInterface.php @@ -43,7 +43,7 @@ interface TeaserInterface public function getTeaserImages(); /** - * @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage + * @return null|ObjectStorage */ public function getTeaserImage(); diff --git a/packages/ep_products/Classes/Domain/Model/Webcam.php b/packages/ep_products/Classes/Domain/Model/Webcam.php index 52f873a..3d3082c 100644 --- a/packages/ep_products/Classes/Domain/Model/Webcam.php +++ b/packages/ep_products/Classes/Domain/Model/Webcam.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Model; +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; + /*************************************************************** * * Copyright notice @@ -26,8 +28,7 @@ namespace EP\EpProducts\Domain\Model; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -class Webcam extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Webcam extends AbstractEntity { /** @@ -36,7 +37,7 @@ class Webcam extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity protected $vendorUid; /** - * @var \EP\EpProducts\Domain\Model\Snowreport + * @var Snowreport */ protected $snowreport; diff --git a/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php b/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php index ae9db36..ef70521 100644 --- a/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php +++ b/packages/ep_products/Classes/Domain/Repository/AbstractRepository.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Domain\Repository; +use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; +use TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException; use EP\EpProducts\Domain\Model\Dto\FilterOptions; use EP\EpProducts\Service\FilterService; use EP\EpProducts\Traits\DbConnectionTrait; @@ -24,8 +26,8 @@ abstract class AbstractRepository extends Repository /** * @param array $uids - * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface - * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException + * @return QueryResultInterface + * @throws InvalidQueryException */ public function getListByUids(array $uids = []) { @@ -149,19 +151,16 @@ abstract class AbstractRepository extends Repository { // Price ranges if (isset($filterSettings['priceRanges']) && is_array($filterSettings['priceRanges']) && count($filterSettings['priceRanges']) > 0) { - $orX = $qb->expr()->orX(); + $orX = $qb->expr()->or(); foreach ($filterSettings['priceRanges'] as $priceRange) { [ $priceMin, $priceMax ] = FilterOptions::$priceRangeOptions[$priceRange]; - $orX->add($qb->expr()->andX( - $qb->expr()->gte( - 'date.min_price', - $qb->createNamedParameter($priceMin, Connection::PARAM_INT) - ), - $qb->expr()->lt( - 'date.min_price', - $qb->createNamedParameter($priceMax, Connection::PARAM_INT) - ) - )); + $orX->add($qb->expr()->and($qb->expr()->gte( + 'date.min_price', + $qb->createNamedParameter($priceMin, Connection::PARAM_INT) + ), $qb->expr()->lt( + 'date.min_price', + $qb->createNamedParameter($priceMax, Connection::PARAM_INT) + ))); } $qb->andWhere($orX); } diff --git a/packages/ep_products/Classes/Domain/Repository/DateRepository.php b/packages/ep_products/Classes/Domain/Repository/DateRepository.php index c047213..8019d54 100644 --- a/packages/ep_products/Classes/Domain/Repository/DateRepository.php +++ b/packages/ep_products/Classes/Domain/Repository/DateRepository.php @@ -36,9 +36,7 @@ class DateRepository extends AbstractRepository $qb->expr()->eq('date.group_travel', $qb->createNamedParameter(0, Connection::PARAM_INT)), 'date.date_start >= NOW()' ) - ->orderBy('date.date_start', 'DESC') - ->addOrderBy('date.uid', 'DESC') - ->execute() + ->orderBy('date.date_start', 'DESC')->addOrderBy('date.uid', 'DESC')->executeQuery() ->fetchFirstColumn() ; } diff --git a/packages/ep_products/Classes/Domain/Repository/HotelRepository.php b/packages/ep_products/Classes/Domain/Repository/HotelRepository.php index 0f4972d..14009c3 100644 --- a/packages/ep_products/Classes/Domain/Repository/HotelRepository.php +++ b/packages/ep_products/Classes/Domain/Repository/HotelRepository.php @@ -26,7 +26,9 @@ namespace EP\EpProducts\Domain\Repository; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - +use TYPO3\CMS\Core\Database\Query\QueryBuilder; +use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; +use TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException; use EP\EpProducts\Domain\Model\Hotel; use Symfony\Component\OptionsResolver\OptionsResolver; use TYPO3\CMS\Core\Database\Connection; @@ -219,7 +221,7 @@ class HotelRepository extends AbstractRepository /** * @param bool $excludeNonSearchable - * @return \TYPO3\CMS\Core\Database\Query\QueryBuilder + * @return QueryBuilder * @throws \Doctrine\DBAL\DBALException */ protected function getQueryBuilder($excludeNonSearchable = true) @@ -253,8 +255,8 @@ class HotelRepository extends AbstractRepository } /** - * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface - * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException + * @return QueryResultInterface + * @throws InvalidQueryException */ public function getMapList() { diff --git a/packages/ep_products/Classes/Domain/Repository/ProductRepository.php b/packages/ep_products/Classes/Domain/Repository/ProductRepository.php index 9a1007a..1ee9749 100644 --- a/packages/ep_products/Classes/Domain/Repository/ProductRepository.php +++ b/packages/ep_products/Classes/Domain/Repository/ProductRepository.php @@ -84,11 +84,7 @@ class ProductRepository extends AbstractRepository ->from('tx_epproducts_domain_model_date', 'date') ->leftJoin('date', 'tx_epproducts_domain_model_concept', 'con', 'date.concept = con.uid') ->leftJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid') - ->where($qb->expr()->andX( - $qb->expr()->eq('date.product_searchable', 1), - $qb->expr()->gt('date.available', 0), - 'date.date_start >= NOW()' - )) + ->where($qb->expr()->and($qb->expr()->eq('date.product_searchable', 1), $qb->expr()->gt('date.available', 0), 'date.date_start >= NOW()')) ->groupBy('date.product') ->addGroupBy('date.hotel') ->addGroupBy('date.date_start') @@ -324,9 +320,7 @@ class ProductRepository extends AbstractRepository ->where($qb->expr()->eq( 'date.product', $qb->createNamedParameter($product->getUid(), Connection::PARAM_INT)) - ) - ->setMaxResults(1) - ->execute() + )->setMaxResults(1)->executeQuery() ->fetchOne() ; diff --git a/packages/ep_products/Classes/Middleware/ApiMiddleware.php b/packages/ep_products/Classes/Middleware/ApiMiddleware.php index 3edf691..41ede65 100644 --- a/packages/ep_products/Classes/Middleware/ApiMiddleware.php +++ b/packages/ep_products/Classes/Middleware/ApiMiddleware.php @@ -2,6 +2,7 @@ namespace EP\EpProducts\Middleware; +use TYPO3\CMS\Core\Database\Connection; use EP\EpProducts\ContentFeed\ContentFeedApi; use EP\EpProducts\Http\ApiKeyAuthenticator; use EP\EpProducts\Service\MyEpImageService; @@ -156,9 +157,7 @@ class ApiMiddleware implements MiddlewareInterface ->leftJoin('product', 'tx_epproducts_domain_model_city', 'city', 'product.city = city.uid') ->leftJoin('product', 'tx_epproducts_domain_model_matchcode', 'matchcode', 'product.uid = matchcode.entity AND matchcode.entity_type="hotel"') ->where($queryBuilder->expr()->eq('product.code', $queryBuilder->createNamedParameter($productCode))) - ->orWhere($queryBuilder->expr()->eq('matchcode.code', $queryBuilder->createNamedParameter($productCode))) - ->setMaxResults(1) - ->execute() + ->orWhere($queryBuilder->expr()->eq('matchcode.code', $queryBuilder->createNamedParameter($productCode)))->setMaxResults(1)->executeQuery() ->fetchAssociative() ; @@ -214,13 +213,8 @@ class ApiMiddleware implements MiddlewareInterface ->from('tx_epproducts_domain_model_hotel', 'hotel') ->leftJoin('hotel', 'tx_epproducts_domain_model_matchcode', 'alias', 'hotel.uid = alias.entity AND alias.entity_type="hotel"') ->where( - $queryBuilder->expr()->orX( - $queryBuilder->expr()->eq('hotel.code', $queryBuilder->createNamedParameter($hotelCode)), - $queryBuilder->expr()->eq('alias.code', $queryBuilder->createNamedParameter($hotelCode)), - ) - ) - ->setMaxResults(1) - ->execute() + $queryBuilder->expr()->or($queryBuilder->expr()->eq('hotel.code', $queryBuilder->createNamedParameter($hotelCode)), $queryBuilder->expr()->eq('alias.code', $queryBuilder->createNamedParameter($hotelCode))) + )->setMaxResults(1)->executeQuery() ->fetchAssociative() ; @@ -270,9 +264,7 @@ class ApiMiddleware implements MiddlewareInterface ) ->from('tx_epproducts_domain_model_region', 'region') ->leftJoin('region', 'tx_epproducts_domain_model_webcam', 'webcam', 'region.webcam = webcam.uid') - ->where($queryBuilder->expr()->eq('region.uid', $queryBuilder->createNamedParameter($regionUid, \PDO::PARAM_INT))) - ->setMaxResults(1) - ->execute() + ->where($queryBuilder->expr()->eq('region.uid', $queryBuilder->createNamedParameter($regionUid, Connection::PARAM_INT)))->setMaxResults(1)->executeQuery() ->fetchAssociative() ; diff --git a/packages/ep_products/Classes/Service/HotelDataService.php b/packages/ep_products/Classes/Service/HotelDataService.php index 29eeba9..47a0d4f 100644 --- a/packages/ep_products/Classes/Service/HotelDataService.php +++ b/packages/ep_products/Classes/Service/HotelDataService.php @@ -36,7 +36,7 @@ class HotelDataService implements SingletonInterface { /** - * @var \EP\EpProducts\Domain\Repository\HotelRepository + * @var HotelRepository */ protected $hotelRepository; diff --git a/packages/ep_products/Classes/Service/ProductImportSource.php b/packages/ep_products/Classes/Service/ProductImportSource.php index e477a75..db62a64 100644 --- a/packages/ep_products/Classes/Service/ProductImportSource.php +++ b/packages/ep_products/Classes/Service/ProductImportSource.php @@ -2,6 +2,8 @@ namespace EP\EpProducts\Service; +use EP\EpProducts\MyEP\ApiException; + /** * A source of the BusPro product export. Implementations read the XML export * from a local drop directory or a remote SFTP server, or the JSON export from @@ -14,7 +16,7 @@ interface ProductImportSource * or null when there is nothing newer than the last successful import. * * @throws SftpImportException on an unrecoverable SFTP acquisition failure - * @throws \EP\EpProducts\MyEP\ApiException on an unrecoverable API failure + * @throws ApiException on an unrecoverable API failure */ public function acquire(): ?ProductImport; diff --git a/packages/ep_products/Classes/Service/ResellerDataService.php b/packages/ep_products/Classes/Service/ResellerDataService.php index 5340a2f..bfc4edc 100644 --- a/packages/ep_products/Classes/Service/ResellerDataService.php +++ b/packages/ep_products/Classes/Service/ResellerDataService.php @@ -177,10 +177,7 @@ class ResellerDataService implements SingletonInterface ->where('d.domainName = :domain') ->andWhere('r.deleted = 0') ->andWhere('r.hidden = 0') - ->andWhere('d.hidden = 0') - ->setParameter('domain', $currentDomain) - ->execute() - ->fetch() + ->andWhere('d.hidden = 0')->setParameter('domain', $currentDomain)->executeQuery()->fetchAssociative() ; } diff --git a/packages/ep_products/Classes/Traits/DbConnectionTrait.php b/packages/ep_products/Classes/Traits/DbConnectionTrait.php index 27aab94..0a56b5d 100644 --- a/packages/ep_products/Classes/Traits/DbConnectionTrait.php +++ b/packages/ep_products/Classes/Traits/DbConnectionTrait.php @@ -26,7 +26,7 @@ namespace EP\EpProducts\Traits; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - +use TYPO3\CMS\Core\Database\Connection; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -35,7 +35,7 @@ trait DbConnectionTrait /** * @param string $connectionName - * @return \TYPO3\CMS\Core\Database\Connection + * @return Connection * @throws \Doctrine\DBAL\DBALException */ protected function getDbConnection($connectionName = 'Default') diff --git a/packages/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php b/packages/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php index f7f72ba..69c44c4 100644 --- a/packages/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php +++ b/packages/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php @@ -35,7 +35,7 @@ trait RequestArgumentTypeConversionTrait /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */ $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - /** @var \EP\EpProducts\Service\FilterService $filterService */ + /** @var FilterService $filterService */ $filterService = $objectManager->get(FilterService::class); if (!$this->request->hasArgument('filterSettings')) { diff --git a/packages/ep_products/Classes/Updates/EPEpProductsCTypeMigration.php b/packages/ep_products/Classes/Updates/EPEpProductsCTypeMigration.php new file mode 100644 index 0000000..b074ca5 --- /dev/null +++ b/packages/ep_products/Classes/Updates/EPEpProductsCTypeMigration.php @@ -0,0 +1,41 @@ + 'pi_plugin1', + * 'pi_plugin2' => 'new_content_element', + * ] + * + * @return array + */ + protected function getListTypeToCTypeMapping(): array + { + return [ + // TODO: Add this mapping yourself! + ]; + } +} diff --git a/packages/ep_products/Classes/UserFunc/TcaProcFunc.php b/packages/ep_products/Classes/UserFunc/TcaProcFunc.php index 2932e6f..5d1b82b 100644 --- a/packages/ep_products/Classes/UserFunc/TcaProcFunc.php +++ b/packages/ep_products/Classes/UserFunc/TcaProcFunc.php @@ -25,10 +25,7 @@ class TcaProcFunc $result = $qb ->select('date_start', 'date_end', 'bus_pro_id') ->from('tx_epproducts_domain_model_date') - ->where($qb->expr()->eq('product', $productUid)) - ->orderBy('date_start') - ->execute() - ->fetchAll() + ->where($qb->expr()->eq('product', $productUid))->orderBy('date_start')->executeQuery()->fetchAllAssociative() ; foreach ($result as $row) { diff --git a/packages/ep_products/Classes/Utility/SerializationUtility.php b/packages/ep_products/Classes/Utility/SerializationUtility.php index 02a0ca0..b5ca137 100644 --- a/packages/ep_products/Classes/Utility/SerializationUtility.php +++ b/packages/ep_products/Classes/Utility/SerializationUtility.php @@ -26,7 +26,7 @@ namespace EP\EpProducts\Utility; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - +use TYPO3\CMS\Core\Http\ApplicationType; use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Object\ObjectManager; @@ -68,7 +68,7 @@ class SerializationUtility foreach ($images as $file) { $image = $file->getOriginalResource(); - if (TYPO3_MODE === 'BE') { + if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend()) { $hostname = 'www.ep-reisen.de'; } else { $hostname = GeneralUtility::getIndpEnv('HTTP_HOST'); diff --git a/packages/ep_products/Configuration/Commands.php b/packages/ep_products/Configuration/Commands.php index 48b96d3..2057b1c 100644 --- a/packages/ep_products/Configuration/Commands.php +++ b/packages/ep_products/Configuration/Commands.php @@ -1,7 +1,9 @@ [ - 'class' => \EP\EpProducts\Command\DateCommandController::class, + 'class' => DateCommandController::class, ], ]; diff --git a/packages/ep_products/Configuration/FlexForms/flexform_product_detail.xml b/packages/ep_products/Configuration/FlexForms/flexform_product_detail.xml index 4b1e2bf..aba512c 100644 --- a/packages/ep_products/Configuration/FlexForms/flexform_product_detail.xml +++ b/packages/ep_products/Configuration/FlexForms/flexform_product_detail.xml @@ -1,75 +1,66 @@ + - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_product - AND tx_epproducts_domain_model_product.hidden = 0 AND tx_epproducts_domain_model_product.deleted = 0 ORDER BY tx_epproducts_domain_model_product.name_internal - - - Alle - 0 - - - 0 - 1 - - - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_hotel - AND tx_epproducts_domain_model_hotel.hidden = 0 AND tx_epproducts_domain_model_hotel.deleted = 0 ORDER BY tx_epproducts_domain_model_hotel.name - - - Alle - 0 - - - 0 - 1 - - - - - - 0 - - - check - - - - - - 0 - - - check - - - - - - - + + 1 + + + + + Konfiguration + array + + + 0 + + + select + selectSingle + tx_epproducts_domain_model_product + AND tx_epproducts_domain_model_product.hidden = 0 AND tx_epproducts_domain_model_product.deleted = 0 ORDER BY tx_epproducts_domain_model_product.name_internal + + + Alle + 0 + + + 0 + 1 + + + + 0 + + + select + selectSingle + tx_epproducts_domain_model_hotel + AND tx_epproducts_domain_model_hotel.hidden = 0 AND tx_epproducts_domain_model_hotel.deleted = 0 ORDER BY tx_epproducts_domain_model_hotel.name + + + Alle + 0 + + + 0 + 1 + + + + 0 + + + check + + + + 0 + + + check + + + + + + diff --git a/packages/ep_products/Configuration/FlexForms/flexform_product_pricetable.xml b/packages/ep_products/Configuration/FlexForms/flexform_product_pricetable.xml index 5a6878f..030d874 100644 --- a/packages/ep_products/Configuration/FlexForms/flexform_product_pricetable.xml +++ b/packages/ep_products/Configuration/FlexForms/flexform_product_pricetable.xml @@ -1,51 +1,46 @@ + - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_product - AND tx_epproducts_domain_model_product.hidden = 0 AND tx_epproducts_domain_model_product.deleted = 0 ORDER BY tx_epproducts_domain_model_product.name_internal - 1 - 1 - - - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_hotel - AND tx_epproducts_domain_model_hotel.hidden = 0 AND tx_epproducts_domain_model_hotel.deleted = 0 ORDER BY tx_epproducts_domain_model_hotel.name - - - Alle - 0 - - - 1 - 1 - - - - - - - + + 1 + + + + + Konfiguration + array + + + 0 + + + select + selectSingle + tx_epproducts_domain_model_product + AND tx_epproducts_domain_model_product.hidden = 0 AND tx_epproducts_domain_model_product.deleted = 0 ORDER BY tx_epproducts_domain_model_product.name_internal + 1 + 1 + + + + 0 + + + select + selectSingle + tx_epproducts_domain_model_hotel + AND tx_epproducts_domain_model_hotel.hidden = 0 AND tx_epproducts_domain_model_hotel.deleted = 0 ORDER BY tx_epproducts_domain_model_hotel.name + + + Alle + 0 + + + 1 + 1 + + + + + + diff --git a/packages/ep_products/Configuration/FlexForms/flexform_product_teaser.xml b/packages/ep_products/Configuration/FlexForms/flexform_product_teaser.xml index 9b9bfcb..38b7a03 100644 --- a/packages/ep_products/Configuration/FlexForms/flexform_product_teaser.xml +++ b/packages/ep_products/Configuration/FlexForms/flexform_product_teaser.xml @@ -1,252 +1,245 @@ + - - 1 - - - - - - Konfiguration - - array - - - - - reload - - select - selectSingle - Product->teasergroup - - - Teasergruppe - Product->teasergroup - - - Einzelteaser - Product->teaser - - - - - - - - - teasergroup]]> - - select - selectSingle - tx_epproducts_domain_model_country - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - - teasergroup]]> - - select - selectSingle - tx_epproducts_domain_model_region - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - - teasergroup]]> - - select - selectSingleBox - tx_epproducts_domain_model_concept - ORDER BY name - - - Keine Zuordnung - 0 - - - 5 - 0 - 10 - - - - - - - - select - selectSingle - tx_epproducts_domain_model_hotel - ORDER BY name - - - Alle - 0 - - - 0 - 1 - - - - - - - teasergroup]]> - - check - - - - - - - teasergroup]]> - - input - 10 - date - - - - - - - teasergroup]]> - - input - 10 - date - - - - - - - teaser]]> - - select - selectSingle - tx_epproducts_domain_model_product - ORDER BY name_internal - - - Alle - 0 - - - 0 - 1 - - - - - - - teasergroup]]> - - select - selectSingle - - - Spalten - cols - - - Reihen - rows - - - - - - - - - teasergroup]]> - - select - selectCheckBox - - - Ferienwohnung - 1 - - - Sportclub - 2 - - - Apartment - 3 - - - Gästehaus - 4 - - - Pension - 5 - - - 0 - 10 - - - - - - 0 - - - check - - - - - - - teasergroup]]> - - select - selectSingle - tx_epproducts_domain_model_infobox - ORDER BY title - - - Default - 0 - - - 0 - 1 - - - - - - - + + 1 + + + + + Konfiguration + array + + + + reload + + select + selectSingle + Product->teasergroup + + + Teasergruppe + Product->teasergroup + + + Einzelteaser + Product->teaser + + + + + + + + teasergroup]]> + + + select + selectSingle + tx_epproducts_domain_model_country + ORDER BY name + + + Keine Zuordnung + 0 + + + 0 + 1 + + + + + + teasergroup]]> + + + select + selectSingle + tx_epproducts_domain_model_region + ORDER BY name + + + Keine Zuordnung + 0 + + + 0 + 1 + + + + + + teasergroup]]> + + + select + selectSingleBox + tx_epproducts_domain_model_concept + ORDER BY name + + + Keine Zuordnung + 0 + + + 5 + 0 + 10 + + + + + + select + selectSingle + tx_epproducts_domain_model_hotel + ORDER BY name + + + Alle + 0 + + + 0 + 1 + + + + + + teasergroup]]> + + + check + + + + + + teasergroup]]> + + + input + 10 + date + + + + + + teasergroup]]> + + + input + 10 + date + + + + + + teaser]]> + + + select + selectSingle + tx_epproducts_domain_model_product + ORDER BY name_internal + + + Alle + 0 + + + 0 + 1 + + + + + + teasergroup]]> + + + select + selectSingle + + + Spalten + cols + + + Reihen + rows + + + + + + + + teasergroup]]> + + + select + selectCheckBox + + + Ferienwohnung + 1 + + + Sportclub + 2 + + + Apartment + 3 + + + Gästehaus + 4 + + + Pension + 5 + + + 0 + 10 + + + + 0 + + + check + + + + + + teasergroup]]> + + + select + selectSingle + tx_epproducts_domain_model_infobox + ORDER BY title + + + Default + 0 + + + 0 + 1 + + + + + + diff --git a/packages/ep_products/Configuration/Icons.php b/packages/ep_products/Configuration/Icons.php new file mode 100644 index 0000000..60ba98d --- /dev/null +++ b/packages/ep_products/Configuration/Icons.php @@ -0,0 +1,8 @@ + [ + 'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + 'source' => 'EXT:ep_products/Resources/Public/Icons/logo.svg', + ], +]; diff --git a/packages/ep_products/Configuration/RequestMiddlewares.php b/packages/ep_products/Configuration/RequestMiddlewares.php index fcf9f13..7d8d1b4 100644 --- a/packages/ep_products/Configuration/RequestMiddlewares.php +++ b/packages/ep_products/Configuration/RequestMiddlewares.php @@ -1,9 +1,12 @@ [ 'ep/productapi' => [ - 'target' => \EP\EpProducts\Middleware\ApiMiddleware::class, + 'target' => ApiMiddleware::class, 'before' => [ 'typo3/cms-frontend/page-resolver', ], @@ -12,7 +15,7 @@ return [ ], ], 'ep/content-page-type-guard' => [ - 'target' => \EP\EpProducts\Middleware\ContentPageTypeGuardMiddleware::class, + 'target' => ContentPageTypeGuardMiddleware::class, 'after' => [ 'typo3/cms-frontend/page-resolver', ], diff --git a/packages/ep_products/Configuration/TCA/Overrides/sys_template.php b/packages/ep_products/Configuration/TCA/Overrides/sys_template.php index b0c3bc1..b33694c 100644 --- a/packages/ep_products/Configuration/TCA/Overrides/sys_template.php +++ b/packages/ep_products/Configuration/TCA/Overrides/sys_template.php @@ -1,8 +1,10 @@ ['type' => 'category']]; + ExtensionManagementUtility::addToAllTCAtypes('tx_epproducts_domain_model_teammember', 'categories'); }); diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_badge.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_badge.php index 504f82e..a263260 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_badge.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_badge.php @@ -7,7 +7,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -34,17 +33,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -54,7 +43,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_badge', 'foreign_table_where' => 'AND tx_epproducts_domain_model_badge.pid=###CURRENT_PID### AND tx_epproducts_domain_model_badge.sys_language_uid IN (-1,0)', @@ -86,30 +75,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -119,7 +104,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'subtitle' => [ @@ -135,9 +121,8 @@ return [ 'exclude' => 0, 'label' => 'Link', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'renderType' => 'inputLink', ] ], ], diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php index 2e2967a..efc85e0 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php @@ -1,4 +1,8 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_city', @@ -7,7 +11,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -39,17 +42,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -59,7 +52,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_city', 'foreign_table_where' => 'AND tx_epproducts_domain_model_city.pid=###CURRENT_PID### AND tx_epproducts_domain_model_city.sys_language_uid IN (-1,0)', @@ -91,30 +84,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -122,9 +111,8 @@ return [ 'exclude' => 0, 'label' => 'Detailseite', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'renderType' => 'inputLink', ] ], 'exclude_from_teasergroups' => [ @@ -141,8 +129,8 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['Winter', \EP\EpProducts\Domain\Model\AbstractDestination::SEASON_WINTER], - ['Sommer', \EP\EpProducts\Domain\Model\AbstractDestination::SEASON_SUMMER], + ['label' => 'Winter', 'value' => AbstractDestination::SEASON_WINTER], + ['label' => 'Sommer', 'value' => AbstractDestination::SEASON_SUMMER], ], ] ], @@ -152,7 +140,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'name_internal' => [ @@ -161,7 +150,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'keywords' => [ @@ -259,31 +249,32 @@ return [ 'teaser_images' => [ 'exclude' => 0, 'label' => 'Teaserbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'teaser_images', - [ - 'appearance' => [ + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'teaser' => [ - 'title' => 'Teaser', - 'value' => 2, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 2, ], ], ], @@ -291,39 +282,39 @@ return [ ], ], ], - 'maxitems' => 10 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + ], + 'maxitems' => 10, + ], ], 'header_images' => [ 'exclude' => 0, 'label' => 'Headerbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'header_images', - [ - 'appearance' => [ + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'headerLarge' => [ - 'title' => 'Header', - 'value' => 3.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'headerLarge' => [ + 'title' => 'Header', + 'value' => 3.8, ], ], ], @@ -331,48 +322,48 @@ return [ ], ], ], - 'maxitems' => 10 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + ], + 'maxitems' => 10, + ], ], 'images' => [ 'exclude' => 0, 'label' => 'Galeriebilder', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'images', - [ - 'appearance' => [ + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Preview', - 'allowedAspectRatios' => [ - 'preview' => [ - 'title' => 'Standard', - 'value' => 1.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, ], ], - 'zoom' => [ - 'title' => 'Zoom', - 'allowedAspectRatios' => [ - 'free' => [ - 'title' => 'frei', - 'value' => 'NaN', - ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', ], ], ], @@ -380,10 +371,9 @@ return [ ], ], ], - 'maxitems' => 10 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + ], + 'maxitems' => 10, + ], ], 'latitude' => [ 'exclude' => 0, @@ -436,7 +426,7 @@ return [ 'renderType' => 'selectSingle', 'foreign_table' => 'tx_epproducts_domain_model_officetip', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_concept.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_concept.php index f03196a..a129ab0 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_concept.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_concept.php @@ -1,4 +1,7 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_concept', @@ -8,7 +11,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -42,17 +44,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -62,7 +54,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_concept', 'foreign_table_where' => 'AND tx_epproducts_domain_model_concept.pid=###CURRENT_PID### AND tx_epproducts_domain_model_concept.sys_language_uid IN (-1,0)', @@ -94,30 +86,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'sorting' => [ @@ -140,7 +128,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'code' => [ @@ -149,7 +138,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 5, - 'eval' => 'trim,lower,required' + 'eval' => 'trim,lower', + 'required' => true ], ], 'description' => [ @@ -216,9 +206,8 @@ return [ 'exclude' => 0, 'label' => 'Detailseite', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'renderType' => 'inputLink', ] ], 'popup_title' => [ @@ -256,20 +245,69 @@ return [ 'teaser_images' => [ 'exclude' => 0, 'label' => 'Teaserbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'teaser_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', + ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaserEven' => [ + 'title' => 'Teaser gerade', + 'value' => 1.3333333333333334, + ], + 'teaserOdd' => [ + 'title' => 'Teaser ungerade', + 'value' => 2.0555555555555556, + ], + 'free' => [ + 'title' => 'Frei', + 'value' => 'NaN', + ], + ], + ], + ], ], ], + ], + ], + 'maxitems' => 10, + ], + ], + 'header_images' => [ + 'exclude' => 0, + 'label' => 'Headerbild(er)', + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette', + ], 'columns' => [ 'crop' => [ 'config' => [ @@ -277,13 +315,13 @@ return [ 'default' => [ 'title' => 'Alle Geräte', 'allowedAspectRatios' => [ - 'teaserEven' => [ - 'title' => 'Teaser gerade', - 'value' => 1.3333333333333334, + 'headerLarge' => [ + 'title' => 'Header groß', + 'value' => 2.3333333333333334, ], - 'teaserOdd' => [ - 'title' => 'Teaser ungerade', - 'value' => 2.0555555555555556, + 'headerSmall' => [ + 'title' => 'Header klein', + 'value' => 3.3333333333333334, ], 'free' => [ 'title' => 'Frei', @@ -296,96 +334,48 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), - ], - 'header_images' => [ - 'exclude' => 0, - 'label' => 'Headerbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'header_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' - --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, - --palette--;;filePalette', - ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'headerLarge' => [ - 'title' => 'Header groß', - 'value' => 2.3333333333333334, - ], - 'headerSmall' => [ - 'title' => 'Header klein', - 'value' => 3.3333333333333334, - ], - 'free' => [ - 'title' => 'Frei', - 'value' => 'NaN', - ], - ], - ], - ], - ], - ], - ], - ], - ], - 'maxitems' => 10 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'images' => [ 'exclude' => 0, 'label' => 'Galeriebilder', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Preview', - 'allowedAspectRatios' => [ - 'preview' => [ - 'title' => 'Standard', - 'value' => 1.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, ], ], - 'zoom' => [ - 'title' => 'Zoom', - 'allowedAspectRatios' => [ - 'free' => [ - 'title' => 'frei', - 'value' => 'NaN', - ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', ], ], ], @@ -393,10 +383,9 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'products' => [ 'exclude' => 0, diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_contingent.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_contingent.php index 2567d13..0153ef4 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_contingent.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_contingent.php @@ -1,13 +1,16 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_contingent', 'label' => 'date', - 'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getContingentLabel', + 'label_userFunc' => LabelService::class . '->getContingentLabel', 'default_sortby' => 'ORDER BY date', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => false, 'hideTable' => true, @@ -32,17 +35,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -52,7 +45,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_contingent', 'foreign_table_where' => 'AND tx_epproducts_domain_model_contingent.pid=###CURRENT_PID### AND tx_epproducts_domain_model_contingent.sys_language_uid IN (-1,0)', @@ -84,30 +77,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -115,18 +104,18 @@ return [ 'exclude' => 0, 'label' => 'Pax', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 3, - 'eval' => 'int,required' + 'required' => true ], ], 'available' => [ 'exclude' => 0, 'label' => 'verfügbar', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 3, - 'eval' => 'int,required' + 'required' => true ], ], 'date' => [ @@ -134,12 +123,11 @@ return [ 'label' => 'Datum', 'config' => [ 'dbType' => 'date', - 'type' => 'input', + 'type' => 'datetime', 'size' => 7, - 'eval' => 'date,required', 'checkbox' => 0, - 'default' => '0000-00-00', - 'renderType' => 'inputDateTime', + 'format' => 'date', + 'required' => true, ], ], 'hotel' => [ @@ -163,9 +151,9 @@ return [ 'minitems' => 1, 'maxitems' => 1, 'items' => [ - [ 'Ok', \EP\EpProducts\Domain\Model\Contingent::STATUS_OK ], - [ 'Buchungsstop', \EP\EpProducts\Domain\Model\Contingent::STATUS_BLOCKED ], - [ 'auf Anfrage', \EP\EpProducts\Domain\Model\Contingent::STATUS_ONREQUEST ], + [ 'label' => 'Ok', 'value' => Contingent::STATUS_OK ], + [ 'label' => 'Buchungsstop', 'value' => Contingent::STATUS_BLOCKED ], + [ 'label' => 'auf Anfrage', 'value' => Contingent::STATUS_ONREQUEST ], ] ], ], @@ -209,9 +197,9 @@ return [ 'exclude' => 0, 'label' => 'groups.ch ID', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'trim,int' + 'eval' => 'trim' ], ], 'room_code' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php index e947bab..7ddef62 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_country.php @@ -1,4 +1,8 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_country', @@ -7,7 +11,6 @@ return [ 'default_sortby' => 'ORDER BY name_internal', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -41,17 +44,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -61,7 +54,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_country', 'foreign_table_where' => 'AND tx_epproducts_domain_model_country.pid=###CURRENT_PID### AND tx_epproducts_domain_model_country.sys_language_uid IN (-1,0)', @@ -93,30 +86,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -124,9 +113,8 @@ return [ 'exclude' => 0, 'label' => 'Detailseite', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'renderType' => 'inputLink', ] ], 'code' => [ @@ -135,7 +123,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 2, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'name' => [ @@ -144,7 +133,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'name_internal' => [ @@ -153,7 +143,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'season' => [ @@ -163,8 +154,8 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['Winter', \EP\EpProducts\Domain\Model\AbstractDestination::SEASON_WINTER], - ['Sommer', \EP\EpProducts\Domain\Model\AbstractDestination::SEASON_SUMMER], + ['label' => 'Winter', 'value' => AbstractDestination::SEASON_WINTER], + ['label' => 'Sommer', 'value' => AbstractDestination::SEASON_SUMMER], ], ] ], @@ -241,31 +232,32 @@ return [ 'teaser_images' => [ 'exclude' => 0, 'label' => 'Teaserbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'teaser_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'teaser' => [ - 'title' => 'Teaser', - 'value' => 2, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 2, ], ], ], @@ -273,39 +265,39 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'header_images' => [ 'exclude' => 0, 'label' => 'Headerbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'header_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'headerLarge' => [ - 'title' => 'Header', - 'value' => 3.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'headerLarge' => [ + 'title' => 'Header', + 'value' => 3.8, ], ], ], @@ -313,48 +305,48 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'images' => [ 'exclude' => 0, 'label' => 'Galeriebilder', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'images', - [ - 'appearance' => [ + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Preview', - 'allowedAspectRatios' => [ - 'preview' => [ - 'title' => 'Standard', - 'value' => 1.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, ], ], - 'zoom' => [ - 'title' => 'Zoom', - 'allowedAspectRatios' => [ - 'free' => [ - 'title' => 'frei', - 'value' => 'NaN', - ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', ], ], ], @@ -362,10 +354,9 @@ return [ ], ], ], - 'maxitems' => 10 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + ], + 'maxitems' => 10, + ], ], 'latitude' => [ 'exclude' => 0, @@ -394,7 +385,7 @@ return [ 'renderType' => 'selectSingle', 'foreign_table' => 'tx_epproducts_domain_model_officetip', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -407,7 +398,7 @@ return [ 'type' => 'select', 'default' => 0, 'items' => [ - ['Keine Zuordnung', 0] + ['label' => 'Keine Zuordnung', 'value' => 0] ], 'renderType' => 'selectSingle', 'foreign_table' => 'tx_epproducts_domain_model_snowreport', diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php index 473e602..f2f935a 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php @@ -1,12 +1,14 @@ [ 'title' => 'Termin', 'label' => 'bus_pro_id', - 'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getDateLabel', + 'label_userFunc' => LabelService::class . '->getDateLabel', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => false, 'hideTable' => true, @@ -36,17 +38,7 @@ return [ 'sys_language_uid' => [ 'exclude' => false, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -56,7 +48,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_date', 'foreign_table_where' => 'AND tx_epproducts_domain_model_date.pid=###CURRENT_PID### AND tx_epproducts_domain_model_date.sys_language_uid IN (-1,0)', @@ -88,30 +80,26 @@ return [ 'exclude' => false, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => false, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'product' => [ @@ -235,8 +223,8 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - [ 'Winter', 'w' ], - [ 'Sommer', 's' ], + [ 'label' => 'Winter', 'value' => 'w' ], + [ 'label' => 'Sommer', 'value' => 's' ], ], 'default' => 'w', ], @@ -246,12 +234,10 @@ return [ 'label' => 'Datum von', 'config' => [ 'dbType' => 'date', - 'type' => 'input', + 'type' => 'datetime', 'size' => 7, - 'eval' => 'date', 'checkbox' => 0, - 'default' => '0000-00-00', - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], 'date_end' => [ @@ -259,12 +245,10 @@ return [ 'label' => 'Datum bis', 'config' => [ 'dbType' => 'date', - 'type' => 'input', + 'type' => 'datetime', 'size' => 7, - 'eval' => 'date', 'checkbox' => 0, - 'default' => '0000-00-00', - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], 'nights' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_fact.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_fact.php index 16716e1..a48d4b7 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_fact.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_fact.php @@ -7,7 +7,6 @@ return [ 'default_sortby' => 'ORDER BY label', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -33,17 +32,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -53,7 +42,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_fact', 'foreign_table_where' => 'AND tx_epproducts_domain_model_fact.pid=###CURRENT_PID### AND tx_epproducts_domain_model_fact.sys_language_uid IN (-1,0)', @@ -85,30 +74,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -118,7 +103,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'label' => [ @@ -127,7 +113,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'keywords' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_faq.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_faq.php index a72ded0..78e67bf 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_faq.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_faq.php @@ -6,7 +6,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -34,17 +33,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -54,7 +43,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_faq', 'foreign_table_where' => 'AND tx_epproducts_domain_model_faq.pid=###CURRENT_PID### AND tx_epproducts_domain_model_faq.sys_language_uid IN (-1,0)', @@ -86,30 +75,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -120,18 +105,18 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - [ '', '' ], - [ 'Buchung & Reiseablauf', 'Buchung & Reiseablauf' ], - [ 'Skipass, Skigebiet & Kurse', 'Skipass, Skigebiet & Kurse' ], - [ 'Änderungen & Zusatzleistungen', 'Änderungen & Zusatzleistungen' ], - [ 'Anreise & Transport', 'Anreise & Transport' ], - [ 'Unterkunft & Sportclubs', 'Unterkunft & Sportclubs' ], - [ 'Programm & Aktivitäten', 'Programm & Aktivitäten' ], - [ 'Eventreisen', 'Eventreisen' ], - [ 'Teilnahmebedingungen', 'Teilnahmebedingungen' ], - [ 'Zahlung & Rechnung', 'Zahlung & Rechnung' ], - [ 'Kontakt & Erreichbarkeit', 'Kontakt & Erreichbarkeit' ], - [ 'Stornierung, Reklamation & Versicherung', 'Stornierung, Reklamation & Versicherung' ], + [ 'label' => '', 'value' => '' ], + [ 'label' => 'Buchung & Reiseablauf', 'value' => 'Buchung & Reiseablauf' ], + [ 'label' => 'Skipass, Skigebiet & Kurse', 'value' => 'Skipass, Skigebiet & Kurse' ], + [ 'label' => 'Änderungen & Zusatzleistungen', 'value' => 'Änderungen & Zusatzleistungen' ], + [ 'label' => 'Anreise & Transport', 'value' => 'Anreise & Transport' ], + [ 'label' => 'Unterkunft & Sportclubs', 'value' => 'Unterkunft & Sportclubs' ], + [ 'label' => 'Programm & Aktivitäten', 'value' => 'Programm & Aktivitäten' ], + [ 'label' => 'Eventreisen', 'value' => 'Eventreisen' ], + [ 'label' => 'Teilnahmebedingungen', 'value' => 'Teilnahmebedingungen' ], + [ 'label' => 'Zahlung & Rechnung', 'value' => 'Zahlung & Rechnung' ], + [ 'label' => 'Kontakt & Erreichbarkeit', 'value' => 'Kontakt & Erreichbarkeit' ], + [ 'label' => 'Stornierung, Reklamation & Versicherung', 'value' => 'Stornierung, Reklamation & Versicherung' ], ], 'default' => '', ], @@ -142,7 +127,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'question' => [ @@ -151,7 +137,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'answer' => [ @@ -161,8 +148,9 @@ return [ 'type' => 'text', 'cols' => 40, 'rows' => 15, - 'eval' => 'trim,required', + 'eval' => 'trim', 'enableRichtext' => true, + 'required' => true, ] ], diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php index a2acf0e..c557a2e 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceboard.php @@ -8,7 +8,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -36,17 +35,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - 'default' => -1, - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -56,7 +45,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_groupspriceboard', 'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceboard.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceboard.sys_language_uid IN (-1,0)', @@ -88,30 +77,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -121,25 +106,26 @@ return [ 'config' => [ 'type' => 'input', 'size' => 32, - 'eval' => 'required', + 'required' => true, ] ], 'price' => [ 'exclude' => false, 'label' => 'Preis pro Person/Nacht', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2,required', + 'format' => 'decimal', + 'required' => true, ] ], 'price_chf' => [ 'exclude' => false, 'label' => 'Preis pro Person/Nacht in CHF', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2', + 'format' => 'decimal', ] ], 'sorting' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceconfig.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceconfig.php index 1be71f2..9d40a39 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceconfig.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceconfig.php @@ -1,13 +1,15 @@ [ 'title' => 'Gruppenhaus Preis', 'default_sortby' => 'ORDER BY date_from', 'label' => 'date_from', - 'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getGroupsPriceConfigLabel', + 'label_userFunc' => LabelService::class . '->getGroupsPriceConfigLabel', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -38,17 +40,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - 'default' => -1, - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -58,7 +50,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_groupspriceconfig', 'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceconfig.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceconfig.sys_language_uid IN (-1,0)', @@ -90,30 +82,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -121,65 +109,66 @@ return [ 'exclude' => false, 'label' => 'Datum von', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 8, - 'eval' => 'date,required', - 'renderType' => 'inputDateTime', + 'format' => 'date', + 'required' => true, ] ], 'date_to' => [ 'exclude' => false, 'label' => 'Datum bis', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 8, - 'eval' => 'date,required', - 'renderType' => 'inputDateTime', + 'format' => 'date', + 'required' => true, ] ], 'persons_included' => [ 'exclude' => false, 'label' => 'Inklusiv-Personen', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 4, - 'eval' => 'int,required', + 'required' => true, ] ], 'price' => [ 'exclude' => false, 'label' => 'Preis pro Nacht', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2,required', + 'format' => 'decimal', + 'required' => true, ] ], 'price_chf' => [ 'exclude' => false, 'label' => 'Preis pro Nacht in CHF', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2', + 'format' => 'decimal', ] ], 'price_additional_person' => [ 'exclude' => false, 'label' => 'Preis weitere Person', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2', + 'format' => 'decimal', ] ], 'price_additional_person_chf' => [ 'exclude' => false, 'label' => 'Preis weitere Person in CHF', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2', + 'format' => 'decimal', ] ], ], diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php index ffe085d..9222f46 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_groupspriceoption.php @@ -1,4 +1,7 @@ [ 'title' => 'Gruppenhaus Zusatzleistung', @@ -8,7 +11,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -37,17 +39,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - 'default' => -1, - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -57,7 +49,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_groupspriceoption', 'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceoption.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceoption.sys_language_uid IN (-1,0)', @@ -89,30 +81,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -122,25 +110,26 @@ return [ 'config' => [ 'type' => 'input', 'size' => 32, - 'eval' => 'required', + 'required' => true, ] ], 'price' => [ 'exclude' => false, 'label' => 'Preis', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2,required', + 'format' => 'decimal', + 'required' => true, ] ], 'price_chf' => [ 'exclude' => false, 'label' => 'Preis in CHF', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 8, - 'eval' => 'double2', + 'format' => 'decimal', ] ], 'type' => [ @@ -150,12 +139,12 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['pauschal', \EP\EpProducts\Domain\Model\GroupsPriceOption::TYPE_GLOBAL], - ['pro Person', \EP\EpProducts\Domain\Model\GroupsPriceOption::TYPE_PER_PAX], - ['pro Nacht', \EP\EpProducts\Domain\Model\GroupsPriceOption::TYPE_PER_NIGHT], - ['pro Person und Nacht', \EP\EpProducts\Domain\Model\GroupsPriceOption::TYPE_PER_PAX_AND_NIGHT], + ['label' => 'pauschal', 'value' => GroupsPriceOption::TYPE_GLOBAL], + ['label' => 'pro Person', 'value' => GroupsPriceOption::TYPE_PER_PAX], + ['label' => 'pro Nacht', 'value' => GroupsPriceOption::TYPE_PER_NIGHT], + ['label' => 'pro Person und Nacht', 'value' => GroupsPriceOption::TYPE_PER_PAX_AND_NIGHT], ], - 'default' => \EP\EpProducts\Domain\Model\GroupsPriceOption::TYPE_GLOBAL, + 'default' => GroupsPriceOption::TYPE_GLOBAL, ] ], 'ignore_with_board' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php index bdf1d97..f3dc636 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php @@ -1,14 +1,18 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_hotel', 'default_sortby' => 'ORDER BY name', 'label' => 'name', 'prependAtCopy' => '[COPY %s]', - 'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getHotelLabel', + 'label_userFunc' => LabelService::class . '->getHotelLabel', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -50,17 +54,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -70,7 +64,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_hotel', 'foreign_table_where' => 'AND tx_epproducts_domain_model_hotel.pid=###CURRENT_PID### AND tx_epproducts_domain_model_hotel.sys_language_uid IN (-1,0)', @@ -102,30 +96,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -161,9 +151,8 @@ return [ 'exclude' => 0, 'label' => 'Detailseite', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'renderType' => 'inputLink', ] ], 'name' => [ @@ -173,7 +162,8 @@ return [ 'type' => 'text', 'cols' => 30, 'rows' => 2, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'short_name' => [ @@ -280,31 +270,32 @@ return [ 'teaser_images' => [ 'exclude' => 0, 'label' => 'Teaserbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'teaser_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'teaser' => [ - 'title' => 'Teaser', - 'value' => 2, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 2, ], ], ], @@ -312,39 +303,39 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'header_images' => [ 'exclude' => 0, 'label' => 'Headerbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'header_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'headerLarge' => [ - 'title' => 'Header', - 'value' => 3.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'headerLarge' => [ + 'title' => 'Header', + 'value' => 3.8, ], ], ], @@ -352,48 +343,48 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'images' => [ 'exclude' => 0, 'label' => 'Galeriebilder', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Preview', - 'allowedAspectRatios' => [ - 'preview' => [ - 'title' => 'Standard', - 'value' => 1.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, ], ], - 'zoom' => [ - 'title' => 'Zoom', - 'allowedAspectRatios' => [ - 'free' => [ - 'title' => 'frei', - 'value' => 'NaN', - ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', ], ], ], @@ -401,33 +392,32 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'reseller_images' => [ 'exclude' => 0, 'label' => 'Bilder für Vertriebspartner', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'reseller_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'code' => [ 'exclude' => 0, @@ -442,10 +432,8 @@ return [ 'exclude' => 0, 'label' => 'Externer Link (Google MyBusiness)', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'eval' => 'trim', - 'renderType' => 'inputLink', ], ], 'type' => [ @@ -455,12 +443,12 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['Unbestimmt', 0], - ['Ferienwohnung', \EP\EpProducts\Domain\Model\Hotel::TYPE_HOLIDAY_FLAT], - ['Sportclub', \EP\EpProducts\Domain\Model\Hotel::TYPE_SPORTS_CLUB], - ['Apartment', \EP\EpProducts\Domain\Model\Hotel::TYPE_APPARTMENT], - ['Gästehaus', \EP\EpProducts\Domain\Model\Hotel::TYPE_GUESTHOUSE], - ['Pension', \EP\EpProducts\Domain\Model\Hotel::TYPE_PENSION], + ['label' => 'Unbestimmt', 'value' => 0], + ['label' => 'Ferienwohnung', 'value' => Hotel::TYPE_HOLIDAY_FLAT], + ['label' => 'Sportclub', 'value' => Hotel::TYPE_SPORTS_CLUB], + ['label' => 'Apartment', 'value' => Hotel::TYPE_APPARTMENT], + ['label' => 'Gästehaus', 'value' => Hotel::TYPE_GUESTHOUSE], + ['label' => 'Pension', 'value' => Hotel::TYPE_PENSION], ], 'size' => 1, 'minItems' => 1, @@ -474,12 +462,12 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['Unbestimmt', 0], - ['Standard', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_STANDARD], - ['Basic', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_BASIC], - ['Komfort', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_COMFORT], - ['Deluxe', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_DELUXE], - ['Super Deluxe', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_SUPER_DELUXE], + ['label' => 'Unbestimmt', 'value' => 0], + ['label' => 'Standard', 'value' => Hotel::CATEGORY_STANDARD], + ['label' => 'Basic', 'value' => Hotel::CATEGORY_BASIC], + ['label' => 'Komfort', 'value' => Hotel::CATEGORY_COMFORT], + ['label' => 'Deluxe', 'value' => Hotel::CATEGORY_DELUXE], + ['label' => 'Super Deluxe', 'value' => Hotel::CATEGORY_SUPER_DELUXE], ], 'size' => 1, 'minItems' => 1, @@ -733,9 +721,8 @@ return [ 'exclude' => 0, 'label' => 'Altersgrenze Jugendliche (6-X Jahre)', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 50, - 'eval' => 'int', ], ], 'main_season_from' => [ @@ -743,12 +730,10 @@ return [ 'label' => 'Hauptsaison von', 'config' => [ 'dbType' => 'date', - 'type' => 'input', + 'type' => 'datetime', 'size' => 7, - 'eval' => 'date', 'checkbox' => 0, - 'default' => '0000-00-00', - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], 'main_season_to' => [ @@ -756,30 +741,26 @@ return [ 'label' => 'Hauptsaison bis', 'config' => [ 'dbType' => 'date', - 'type' => 'input', + 'type' => 'datetime', 'size' => 7, - 'eval' => 'date', 'checkbox' => 0, - 'default' => '0000-00-00', - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], 'beds_count' => [ 'exclude' => 0, 'label' => 'Anzahl Betten', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 50, - 'eval' => 'int', ], ], 'parking_count' => [ 'exclude' => 0, 'label' => 'Anzahl Parkplätze', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 50, - 'eval' => 'int', ], ], 'altitude' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel_mapping.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel_mapping.php index 3e2726c..c98f8f6 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel_mapping.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel_mapping.php @@ -5,7 +5,6 @@ return [ 'label' => 'product', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -32,17 +31,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - 'default' => 0, - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -52,7 +41,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_hotel_mapping', 'foreign_table_where' => 'AND tx_epproducts_domain_model_hotel_mapping.pid=###CURRENT_PID### AND tx_epproducts_domain_model_hotel_mapping.sys_language_uid IN (-1,0)', @@ -84,30 +73,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'product' => [ @@ -127,9 +112,8 @@ return [ 'exclude' => 0, 'label' => 'Detailseite', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'renderType' => 'inputLink', ] ], 'hotel' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_infobox.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_infobox.php index 3317085..eaa7fc1 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_infobox.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_infobox.php @@ -7,7 +7,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -35,17 +34,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - 'default' => 0, - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -55,7 +44,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_infobox', 'foreign_table_where' => 'AND tx_epproducts_domain_model_infobox.pid=###CURRENT_PID### AND tx_epproducts_domain_model_infobox.sys_language_uid IN (-1,0)', @@ -87,30 +76,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -120,7 +105,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'text' => [ @@ -130,8 +116,9 @@ return [ 'type' => 'text', 'cols' => 40, 'rows' => 15, - 'eval' => 'trim,required', + 'eval' => 'trim', 'enableRichtext' => true, + 'required' => true, ] ], 'default_text' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_journey.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_journey.php index 5413972..8ee118d 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_journey.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_journey.php @@ -1,4 +1,7 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_journey', @@ -7,7 +10,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -32,17 +34,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -52,7 +44,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_journey', 'foreign_table_where' => 'AND tx_epproducts_domain_model_journey.pid=###CURRENT_PID### AND tx_epproducts_domain_model_journey.sys_language_uid IN (-1,0)', @@ -84,30 +76,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -117,7 +105,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'by_car' => [ @@ -145,26 +134,26 @@ return [ 'image' => [ 'exclude' => 0, 'label' => 'Bild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'image', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], ], - 'maxitems' => 1, - 'minitems' => 0, ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 1, + 'minitems' => 0, + ], ], ], ]; diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_matchcode.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_matchcode.php index cf92888..16aae1d 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_matchcode.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_matchcode.php @@ -6,7 +6,6 @@ return [ 'prependAtCopy' => '[COPY %s]', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => false, 'hideTable' => true, @@ -33,17 +32,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -53,7 +42,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_matchcode', 'foreign_table_where' => 'AND tx_epproducts_domain_model_matchcode.pid=###CURRENT_PID### AND tx_epproducts_domain_model_matchcode.sys_language_uid IN (-1,0)', @@ -85,30 +74,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -118,7 +103,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'entity_type' => [ @@ -129,8 +115,8 @@ return [ 'renderType' => 'selectSingle', 'items' => [ [ - 'Hotel', - 'hotel', + 'label' => 'Hotel', + 'value' => 'hotel', ], ], ], diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_officetip.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_officetip.php index 0bc185b..e1d7247 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_officetip.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_officetip.php @@ -1,13 +1,15 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_officetip', 'label' => 'label', 'prependAtCopy' => '[COPY %s]', - 'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getOfficetipLabel', + 'label_userFunc' => LabelService::class . '->getOfficetipLabel', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -33,17 +35,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -53,7 +45,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_officetip', 'foreign_table_where' => 'AND tx_epproducts_domain_model_officetip.pid=###CURRENT_PID### AND tx_epproducts_domain_model_officetip.sys_language_uid IN (-1,0)', @@ -85,30 +77,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -118,7 +106,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'text' => [ @@ -128,7 +117,8 @@ return [ 'type' => 'text', 'cols' => 40, 'rows' => 15, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ] ], 'author' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php index a7cd7b2..ae7f8f6 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php @@ -1,14 +1,18 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product', 'label' => 'name_internal', 'prependAtCopy' => '[COPY %s]', - 'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getProductLabel', + 'label_userFunc' => LabelService::class . '->getProductLabel', 'default_sortby' => 'ORDER BY name_internal', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -53,17 +57,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -73,7 +67,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_product', 'foreign_table_where' => 'AND tx_epproducts_domain_model_product.pid=###CURRENT_PID### AND tx_epproducts_domain_model_product.sys_language_uid IN (-1,0)', @@ -105,30 +99,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -182,8 +172,8 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - [ 'Winter', 'w' ], - [ 'Sommer', 's' ], + [ 'label' => 'Winter', 'value' => 'w' ], + [ 'label' => 'Sommer', 'value' => 's' ], ], 'default' => 'w', ], @@ -211,7 +201,8 @@ return [ 'type' => 'text', 'cols' => 30, 'rows' => 2, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'name_internal' => [ @@ -220,7 +211,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'subline' => [ @@ -391,18 +383,17 @@ return [ 'exclude' => 0, 'label' => 'Durchschnittliche Bewertung', 'config' => [ - 'type' => 'input', + 'type' => 'number', 'size' => 5, - 'eval' => 'double2' + 'format' => 'decimal' ], ], 'rating_votes_count' => [ 'exclude' => 0, 'label' => 'Abgebene Stimmen', 'config' => [ - 'type' => 'input', - 'size' => 10, - 'eval' => 'int' + 'type' => 'number', + 'size' => 10 ], ], 'testimonials' => [ @@ -419,31 +410,32 @@ return [ 'teaser_images' => [ 'exclude' => 0, 'label' => 'Teaserbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'teaser_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'teaser' => [ - 'title' => 'Teaser', - 'value' => 2, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 2, ], ], ], @@ -451,39 +443,39 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'header_images' => [ 'exclude' => 0, 'label' => 'Headerbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'header_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'headerLarge' => [ - 'title' => 'Header', - 'value' => 3.805, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'headerLarge' => [ + 'title' => 'Header', + 'value' => 3.805, ], ], ], @@ -491,39 +483,39 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'images' => [ 'exclude' => 0, 'label' => 'Galeriebilder', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Slider', - 'allowedAspectRatios' => [ - 'preview' => [ - 'title' => 'Standard', - 'value' => 1.625, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Slider', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.625, ], ], ], @@ -531,92 +523,92 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'reseller_images' => [ 'exclude' => 0, 'label' => 'Bilder für Vertriebspartner', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'reseller_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'facebook' => [ - 'title' => 'Facebook', - 'allowedAspectRatios' => [ - 'ad' => [ - 'title' => 'Single product ad', - 'value' => 1.91, - ], - 'carousel' => [ - 'title' => 'Carousel', - 'value' => 1, - ], - ] - ], - 'google' => [ - 'title' => 'Google', - 'allowedAspectRatios' => [ - 'catalog' => [ - 'title' => 'Catalog', - 'value' => 1, - ], - ] - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'facebook' => [ + 'title' => 'Facebook', + 'allowedAspectRatios' => [ + 'ad' => [ + 'title' => 'Single product ad', + 'value' => 1.91, + ], + 'carousel' => [ + 'title' => 'Carousel', + 'value' => 1, + ], + ] + ], + 'google' => [ + 'title' => 'Google', + 'allowedAspectRatios' => [ + 'catalog' => [ + 'title' => 'Catalog', + 'value' => 1, + ], + ] ], ], ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'tour_thumbnail' => [ 'exclude' => 0, 'label' => 'Thumbnail Rundgang', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'tour_thumbnail', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Preview', - 'allowedAspectRatios' => [ - 'preview' => [ - 'title' => 'Standard', - 'value' => 1.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, ], ], ], @@ -624,10 +616,9 @@ return [ ], ], ], - 'maxitems' => 1, ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 1, + ], ], 'concept' => [ 'exclude' => 0, @@ -691,7 +682,7 @@ return [ 'foreign_table' => 'tx_epproducts_domain_model_journey', 'foreign_table_where' => 'AND 1=1 ORDER BY name', 'items' => [ - ['Keine Zuordnung', 0] + ['label' => 'Keine Zuordnung', 'value' => 0] ], 'minitems' => 0, 'maxitems' => 1, @@ -748,7 +739,7 @@ return [ 'foreign_table' => 'tx_epproducts_domain_model_hotel', 'foreign_table_where' => 'AND 1=1 ORDER BY tx_epproducts_domain_model_hotel.name', 'items' => [ - [ 'Kein Kalender', 0 ], + [ 'label' => 'Kein Kalender', 'value' => 0 ], ], ], ], @@ -761,7 +752,7 @@ return [ 'renderType' => 'selectSingle', 'foreign_table' => 'tx_epproducts_domain_model_officetip', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -802,7 +793,7 @@ return [ 'foreign_table' => 'tx_epproducts_domain_model_product', 'foreign_table_where' => 'AND tx_epproducts_domain_model_product.uid != ###THIS_UID### ORDER BY tx_epproducts_domain_model_product.name_internal', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -829,25 +820,25 @@ return [ 'banner' => [ 'exclude' => 0, 'label' => 'Banner für Sidebar', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'banner', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], ], - 'maxitems' => 1 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 1, + ], ], 'additional_regions' => [ 'exclude' => 0, @@ -874,7 +865,7 @@ return [ 'foreign_table' => 'tx_epproducts_domain_model_badge', 'foreign_table_where' => 'AND tx_epproducts_domain_model_badge.deleted = 0 ORDER BY tx_epproducts_domain_model_badge.title', 'items' => [ - ['Keine Auswahl', 0], + ['label' => 'Keine Auswahl', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -890,7 +881,7 @@ return [ 'foreign_table' => 'tx_epproducts_domain_model_infobox', 'foreign_table_where' => 'AND tx_epproducts_domain_model_infobox.deleted = 0 ORDER BY tx_epproducts_domain_model_infobox.title', 'items' => [ - ['Standardtext', 0], + ['label' => 'Standardtext', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -908,10 +899,8 @@ return [ 'exclude' => 0, 'label' => 'URL 360° Rundgang (matterport)', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'eval' => 'trim', - 'renderType' => 'inputLink', ], ], 'path_segment' => [ @@ -936,15 +925,14 @@ return [ 'config' => [ 'type' => 'select', 'renderType' => 'selectMultipleSideBySide', - 'itemsProcFunc' => \EP\EpProducts\UserFunc\TcaProcFunc::class.'->getDateItemsForProduct', + 'itemsProcFunc' => TcaProcFunc::class.'->getDateItemsForProduct', ] ], 'min_price' => [ 'exclude' => 0, 'label' => 'Ab-Preis', 'config' => [ - 'type' => 'input', - 'eval' => 'int' + 'type' => 'number' ], ] ], diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php index b2c7cf6..45e02cb 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_region.php @@ -1,4 +1,8 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_region', @@ -7,7 +11,6 @@ return [ 'default_sortby' => 'ORDER BY name_internal', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -44,17 +47,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -64,7 +57,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_region', 'foreign_table_where' => 'AND tx_epproducts_domain_model_region.pid=###CURRENT_PID### AND tx_epproducts_domain_model_region.sys_language_uid IN (-1,0)', @@ -96,30 +89,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -127,9 +116,8 @@ return [ 'exclude' => 0, 'label' => 'Detailseite', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 30, - 'renderType' => 'inputLink', ] ], 'exclude_from_teasergroups' => [ @@ -145,7 +133,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'name_internal' => [ @@ -154,7 +143,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'season' => [ @@ -164,8 +154,8 @@ return [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['Winter', \EP\EpProducts\Domain\Model\AbstractDestination::SEASON_WINTER], - ['Sommer', \EP\EpProducts\Domain\Model\AbstractDestination::SEASON_SUMMER], + ['label' => 'Winter', 'value' => AbstractDestination::SEASON_WINTER], + ['label' => 'Sommer', 'value' => AbstractDestination::SEASON_SUMMER], ], ] ], @@ -311,31 +301,32 @@ return [ 'teaser_images' => [ 'exclude' => 0, 'label' => 'Teaserbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'teaser_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'teaser' => [ - 'title' => 'Teaser', - 'value' => 2, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'teaser' => [ + 'title' => 'Teaser', + 'value' => 2, ], ], ], @@ -343,39 +334,39 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'header_images' => [ 'exclude' => 0, 'label' => 'Headerbild(er)', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'header_images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'headerLarge' => [ - 'title' => 'Header', - 'value' => 3.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'headerLarge' => [ + 'title' => 'Header', + 'value' => 3.8, ], ], ], @@ -383,48 +374,48 @@ return [ ], ], ], - 'maxitems' => 10 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 10, + ], ], 'images' => [ 'exclude' => 0, 'label' => 'Galeriebilder', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'images', - [ - 'appearance' => [ + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Preview', - 'allowedAspectRatios' => [ - 'preview' => [ - 'title' => 'Standard', - 'value' => 1.8, - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, ], ], - 'zoom' => [ - 'title' => 'Zoom', - 'allowedAspectRatios' => [ - 'free' => [ - 'title' => 'frei', - 'value' => 'NaN', - ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', ], ], ], @@ -432,33 +423,32 @@ return [ ], ], ], - 'maxitems' => 10 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + ], + 'maxitems' => 10, + ], ], 'region_maps' => [ 'exclude' => 0, 'label' => 'Gebietskarten', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'region_maps', - [ - 'appearance' => [ + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], ], - 'maxitems' => 5 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + ], + 'maxitems' => 5, + ], ], 'latitude' => [ 'exclude' => 0, @@ -523,7 +513,7 @@ return [ 'renderType' => 'selectSingle', 'foreign_table' => 'tx_epproducts_domain_model_officetip', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -537,7 +527,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['Keine Zuordnung', 0] + ['label' => 'Keine Zuordnung', 'value' => 0] ], 'foreign_table' => 'tx_epproducts_domain_model_snowreport', 'foreign_table_where' => 'ORDER BY tx_epproducts_domain_model_snowreport.region_name', @@ -552,7 +542,7 @@ return [ 'type' => 'select', 'default' => 0, 'items' => [ - ['Keine Zuordnung', 0] + ['label' => 'Keine Zuordnung', 'value' => 0] ], 'renderType' => 'selectSingle', 'foreign_table' => 'tx_epproducts_domain_model_webcam', @@ -565,34 +555,32 @@ return [ 'award_image' => [ 'exclude' => 0, 'label' => 'Bild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'award_image', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], ], - 'maxitems' => 1 ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 1, + ], ], 'award_link' => [ 'exclude' => 0, 'label' => 'Link', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 32, - 'eval' => 'trim', - 'renderType' => 'inputLink', ] ], 'award_label' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_reseller.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_reseller.php index eae2dfe..e3f5e37 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_reseller.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_reseller.php @@ -7,7 +7,6 @@ return [ 'default_sortby' => 'ORDER BY name', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -31,17 +30,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -51,7 +40,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_reseller', 'foreign_table_where' => 'AND tx_epproducts_domain_model_reseller.pid=###CURRENT_PID### AND tx_epproducts_domain_model_reseller.sys_language_uid IN (-1,0)', @@ -83,30 +72,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], @@ -116,7 +101,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'code' => [ @@ -125,7 +111,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'pa_code' => [ diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_snowreport.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_snowreport.php index 3a09753..64a0635 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_snowreport.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_snowreport.php @@ -7,7 +7,6 @@ return [ 'default_sortby' => 'ORDER BY region_name', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -34,17 +33,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -54,7 +43,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_snowreport', 'foreign_table_where' => 'AND tx_epproducts_domain_model_snowreport.pid=###CURRENT_PID### AND tx_epproducts_domain_model_snowreport.sys_language_uid IN (-1,0)', @@ -86,30 +75,27 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'date', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], @@ -124,7 +110,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'region_name' => [ @@ -133,7 +120,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'glacier' => [ @@ -147,18 +135,16 @@ return [ 'exclude' => 0, 'label' => 'Höhe max.', 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'int' + 'type' => 'number', + 'size' => 30 ], ], 'height_min' => [ 'exclude' => 0, 'label' => 'Höhe min.', 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'int' + 'type' => 'number', + 'size' => 30 ], ], 'opened' => [ @@ -172,18 +158,16 @@ return [ 'exclude' => 0, 'label' => 'Schneehöhe Berg', 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'int' + 'type' => 'number', + 'size' => 30 ], ], 'snow_level_valley' => [ 'exclude' => 0, 'label' => 'Schneehöhe Tal', 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'int' + 'type' => 'number', + 'size' => 30 ], ], 'snow_quality' => [ @@ -199,48 +183,44 @@ return [ 'exclude' => 0, 'label' => 'Letzter Schneefall', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'date', 'checkbox' => 0, 'default' => 0, 'range' => [ 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) ], - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], 'lifts_total' => [ 'exclude' => 0, 'label' => 'Lifte gesamt', 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'int' + 'type' => 'number', + 'size' => 30 ], ], 'lifts_opened' => [ 'exclude' => 0, 'label' => 'Lifte geöffnet', 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'int' + 'type' => 'number', + 'size' => 30 ], ], 'last_update' => [ 'exclude' => 0, 'label' => 'Letzte Aktualisierung', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'date', 'checkbox' => 0, 'default' => 0, 'range' => [ 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) ], - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], 'webcams' => [ @@ -256,30 +236,28 @@ return [ 'exclude' => 0, 'label' => 'Saison Anfang', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'date', 'checkbox' => 0, 'default' => 0, 'range' => [ 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) ], - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], 'season_end' => [ 'exclude' => 0, 'label' => 'Saison Ende', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'date', 'checkbox' => 0, 'default' => 0, 'range' => [ 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) ], - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], ], diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_teammember.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_teammember.php index 16e9fa4..bf60489 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_teammember.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_teammember.php @@ -1,5 +1,7 @@ [ 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_teammember', @@ -9,7 +11,6 @@ return [ 'sortby' => 'sorting', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -38,17 +39,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -58,7 +49,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_teammember', 'foreign_table_where' => 'AND tx_epproducts_domain_model_teammember.pid=###CURRENT_PID### AND tx_epproducts_domain_model_teammember.sys_language_uid IN (-1,0)', @@ -90,30 +81,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'sorting' => [ @@ -128,7 +115,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'path_segment' => [ @@ -153,7 +141,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'phone' => [ @@ -189,26 +178,26 @@ return [ 'image' => [ 'exclude' => 0, 'label' => 'Bild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'image', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference' + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette', - ], ], ], - 'maxitems' => 1, - 'minitems' => 1, ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), + 'maxitems' => 1, + 'minitems' => 1, + ], ], ], ]; diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_webcam.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_webcam.php index 777bb74..368ea9a 100644 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_webcam.php +++ b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_webcam.php @@ -7,7 +7,6 @@ return [ 'default_sortby' => 'ORDER BY name', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'languageField' => 'sys_language_uid', @@ -32,17 +31,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -52,7 +41,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_epproducts_domain_model_webcam', 'foreign_table_where' => 'AND tx_epproducts_domain_model_webcam.pid=###CURRENT_PID### AND tx_epproducts_domain_model_webcam.sys_language_uid IN (-1,0)', @@ -84,30 +73,27 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'date', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', + 'format' => 'date', ], ], @@ -122,7 +108,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'url' => [ @@ -131,7 +118,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'vendor_uid' => [ @@ -140,7 +128,8 @@ return [ 'config' => [ 'type' => 'input', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'available' => [ diff --git a/packages/ep_products/Configuration/TypoScript/constants.typoscript b/packages/ep_products/Configuration/TypoScript/constants.typoscript index 6d6c778..b40dc6e 100644 --- a/packages/ep_products/Configuration/TypoScript/constants.typoscript +++ b/packages/ep_products/Configuration/TypoScript/constants.typoscript @@ -6,63 +6,63 @@ plugin.tx_epproducts { settings { - # cat=epproducts/100/100; type=string; label=Products storage PID - productsStoragePid = - # cat=epproducts/100/110; type=string; label=Hotels storage PID - hotelsStoragePid = - # cat=epproducts/100/120; type=string; label=Concepts storage PID - conceptsStoragePid = - # cat=epproducts/100/130; type=string; label=Facts storage PID - factsStoragePid = - # cat=epproducts/100/140; type=string; label=Faqs storage PID - faqsStoragePid = - # cat=epproducts/100/150; type=string; label=Destinations storage PID - destinationsStoragePid = - # cat=epproducts/100/160; type=string; label=Regions storage PID - regionsStoragePid = - # cat=epproducts/100/160; type=string; label=Cities storage PID - citiesStoragePid = - # cat=epproducts/100/170; type=string; label=Teammember storage PID - teammemberStoragePid = - # cat=epproducts/100/180; type=string; label=Officetip storage PID - officetipStoragePid = - # cat=epproducts/100/190; type=string; label=Snow report storage PID - snowReportStoragePid = - # cat=epproducts/110/100; type=string; label=Default search page UID - defaultSearchPageUid = - # cat=epproducts/110/110; type=string; label=Default product detail page UID - defaultDetailPageUid = - # cat=epproducts/110/120; type=string; label=Page UID with reseller export plugin - resellerExportPageUid = - # cat=epproducts/110/130; type=string; label=Page UID with travel info plugin - travelInfoPageUid = - # cat=epproducts/120/100; type=string; label=Exclude products with concept UIDs from search result (CSV) + # cat=epproducts/100/100; type=string; label=Products storage PID + productsStoragePid = + # cat=epproducts/100/110; type=string; label=Hotels storage PID + hotelsStoragePid = + # cat=epproducts/100/120; type=string; label=Concepts storage PID + conceptsStoragePid = + # cat=epproducts/100/130; type=string; label=Facts storage PID + factsStoragePid = + # cat=epproducts/100/140; type=string; label=Faqs storage PID + faqsStoragePid = + # cat=epproducts/100/150; type=string; label=Destinations storage PID + destinationsStoragePid = + # cat=epproducts/100/160; type=string; label=Regions storage PID + regionsStoragePid = + # cat=epproducts/100/160; type=string; label=Cities storage PID + citiesStoragePid = + # cat=epproducts/100/170; type=string; label=Teammember storage PID + teammemberStoragePid = + # cat=epproducts/100/180; type=string; label=Officetip storage PID + officetipStoragePid = + # cat=epproducts/100/190; type=string; label=Snow report storage PID + snowReportStoragePid = + # cat=epproducts/110/100; type=string; label=Default search page UID + defaultSearchPageUid = + # cat=epproducts/110/110; type=string; label=Default product detail page UID + defaultDetailPageUid = + # cat=epproducts/110/120; type=string; label=Page UID with reseller export plugin + resellerExportPageUid = + # cat=epproducts/110/130; type=string; label=Page UID with travel info plugin + travelInfoPageUid = + # cat=epproducts/120/100; type=string; label=Exclude products with concept UIDs from search result (CSV) excludedConceptUids = - # cat=epproducts/120/110; type=string; label=Exclude regions with these UIDs from filter options (CSV) + # cat=epproducts/120/110; type=string; label=Exclude regions with these UIDs from filter options (CSV) excludedRegionUids = - # cat=epproducts/120/120; type=string; label=Force concept UID in all search related parts (CSV) + # cat=epproducts/120/120; type=string; label=Force concept UID in all search related parts (CSV) forcedConceptUids = - # cat=epproducts/120/130; type=string; label=Don't show availability info for products with these concept UIDs + # cat=epproducts/120/130; type=string; label=Don't show availability info for products with these concept UIDs noInfoConceptUids = - # cat=epproducts/130/110; type=string; label=Email recipient for groups price inquiries - groupsPriceToEmail = gruppen@ep-reisen.de - # cat=epproducts/130/120; type=string; label=Email recipient for groups price inquiries - groupsPriceToName = EP Reisen - # cat=epproducts/130/130; type=string; label=Email recipient for groups price inquiries - groupsBookingUrl = https://myep.ddev.site/groups/booking/init - # cat=epproducts/140/100; type=string; label=Room types for pricetables (CSV) + # cat=epproducts/130/110; type=string; label=Email recipient for groups price inquiries + groupsPriceToEmail = gruppen@ep-reisen.de + # cat=epproducts/130/120; type=string; label=Email recipient for groups price inquiries + groupsPriceToName = EP Reisen + # cat=epproducts/130/130; type=string; label=Email recipient for groups price inquiries + groupsBookingUrl = https://myep.ddev.site/groups/booking/init + # cat=epproducts/140/100; type=string; label=Room types for pricetables (CSV) priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10 - # cat=epproducts/140/110; type=string; label=Ignore following IPs in searchlog + # cat=epproducts/140/110; type=string; label=Ignore following IPs in searchlog searchLogIgnoreIps = - # cat=epproducts/140/120; type=string; label=Concept UIDs to trigger inquiry form on product detail page (CSV) + # cat=epproducts/140/120; type=string; label=Concept UIDs to trigger inquiry form on product detail page (CSV) groupInquiryFormConceptUids = - # cat=epproducts/140/130; type=string; label=Per-site MyE&P booking URL override - myEpUrl = - # cat=epproducts/140/140; type=string; label=Per-site MyE&P staging booking URL override - myEpStagingUrl = - } + # cat=epproducts/140/130; type=string; label=Per-site MyE&P booking URL override + myEpUrl = + # cat=epproducts/140/140; type=string; label=Per-site MyE&P staging booking URL override + myEpStagingUrl = + } persistence { - # cat=epproducts/100/100; type=string; label=Default storage PID + # cat=epproducts/100/100; type=string; label=Default storage PID storagePid = } } diff --git a/packages/ep_products/Configuration/TypoScript/setup.typoscript b/packages/ep_products/Configuration/TypoScript/setup.typoscript index a5378bb..b80e7cc 100644 --- a/packages/ep_products/Configuration/TypoScript/setup.typoscript +++ b/packages/ep_products/Configuration/TypoScript/setup.typoscript @@ -61,9 +61,9 @@ plugin.tx_epproducts { dataProtectionPageUid = {$plugin.tx_eptheme.settings.dataProtectionPageUid} datePickerPresets { 1 { - label = Silvester - dateFrom = 2017-12-25 - dateTo = 2018-01-06 + label = Silvester + dateFrom = 2017-12-25 + dateTo = 2018-01-06 } 2 { label = Karneval diff --git a/packages/ep_products/Resources/Private/Language/locallang.xlf b/packages/ep_products/Resources/Private/Language/locallang.xlf index 32cf553..7d88a66 100644 --- a/packages/ep_products/Resources/Private/Language/locallang.xlf +++ b/packages/ep_products/Resources/Private/Language/locallang.xlf @@ -1,68 +1,68 @@ - + - -
- - - Termin - - - Produkt - - - Konzept - - - Land - - - Gebiet - - - Stadt/Ort - - - Fact - - - Hotel - - - Faq - - - Code - - - Office-Tipp - - - Mitarbeiter/Teamer - - - Anreise - - - Schneereport - - - Webcam - - - Kontingent - - - Badge - - - Statisches Suchergebnis - - - Vertriebspartner - - - Infobox - - - + +
+ + + Termin + + + Produkt + + + Konzept + + + Land + + + Gebiet + + + Stadt/Ort + + + Fact + + + Hotel + + + Faq + + + Code + + + Office-Tipp + + + Mitarbeiter/Teamer + + + Anreise + + + Schneereport + + + Webcam + + + Kontingent + + + Badge + + + Statisches Suchergebnis + + + Vertriebspartner + + + Infobox + + + diff --git a/packages/ep_products/ext_emconf.php b/packages/ep_products/ext_emconf.php index fd862f1..8828923 100644 --- a/packages/ep_products/ext_emconf.php +++ b/packages/ep_products/ext_emconf.php @@ -7,10 +7,6 @@ $EM_CONF[$_EXTKEY] = [ 'author' => 'Björn Fromme', 'author_email' => 'fromme@dreipunktnull.com', 'state' => 'stable', - 'internal' => '', - 'uploadfolder' => '1', - 'createDirs' => '', - 'clearCacheOnLoad' => 0, 'version' => '1.0.0', 'constraints' => [ 'depends' => [], diff --git a/packages/ep_products/ext_localconf.php b/packages/ep_products/ext_localconf.php index 8bb45e6..a137b58 100644 --- a/packages/ep_products/ext_localconf.php +++ b/packages/ep_products/ext_localconf.php @@ -1,5 +1,13 @@ registerIcon( - 'ep-logo', - \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, - ['source' => 'EXT:ep_products/Resources/Public/Icons/logo.svg'] - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', + ExtensionUtility::configurePlugin( + 'EpProducts', 'product_detail', [ - 'Product' => 'detail,hotelList', + ProductController::class => 'detail,hotelList', ] ); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', + ExtensionUtility::configurePlugin( + 'EpProducts', 'product_teasergroup', [ - 'Product' => 'teasergroup', + ProductController::class => 'teasergroup', ] ); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', + ExtensionUtility::configurePlugin( + 'EpProducts', 'product_pricetable', [ - 'Product' => 'pricetable', + ProductController::class => 'pricetable', ] ); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', + ExtensionUtility::configurePlugin( + 'EpProducts', 'ajax', [ - 'AjaxTable' => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', - 'AjaxTeaserPopup' => 'concept', + AjaxTableController::class => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', + AjaxTeaserPopupController::class => 'concept', ], [ - 'AjaxTable' => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', - 'AjaxTeaserPopup' => 'concept', + AjaxTableController::class => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', + AjaxTeaserPopupController::class => 'concept', ] ); @@ -74,11 +75,11 @@ $boot = function () { $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'f'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['routing']['aspects']['PassthroughMapper'] = - \EP\EpProducts\Routing\Aspect\PassthroughMapper::class; + PassthroughMapper::class; $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [ - \TYPO3\CMS\Core\Log\LogLevel::INFO => [ - \EP\EpProducts\Log\Writer::class => [ + LogLevel::INFO => [ + Writer::class => [ 'logTable' => 'tx_epproducts_log' ], ], diff --git a/packages/ep_theme/Classes/DataProcessing/ProductRatingProcessor.php b/packages/ep_theme/Classes/DataProcessing/ProductRatingProcessor.php index 7880a0d..30cb562 100644 --- a/packages/ep_theme/Classes/DataProcessing/ProductRatingProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/ProductRatingProcessor.php @@ -19,9 +19,7 @@ class ProductRatingProcessor implements DataProcessorInterface $qb = $this->getDbConnection()->createQueryBuilder(); $result = $qb - ->selectLiteral('SUM(product.rating_votes_count) as totalCount', 'SUM(product.rating_average) as totalAverage') - ->from('tx_epproducts_domain_model_product', 'product') - ->execute() + ->selectLiteral('SUM(product.rating_votes_count) as totalCount', 'SUM(product.rating_average) as totalAverage')->from('tx_epproducts_domain_model_product', 'product')->executeQuery() ->fetchAssociative() ; @@ -30,9 +28,7 @@ class ProductRatingProcessor implements DataProcessorInterface $result = $qb ->selectLiteral('COUNT(*) as ratedCount') - ->from('tx_epproducts_domain_model_product', 'product') - ->where($qb->expr()->gt('product.rating_average', 0)) - ->execute() + ->from('tx_epproducts_domain_model_product', 'product')->where($qb->expr()->gt('product.rating_average', 0))->executeQuery() ->fetchAssociative() ; diff --git a/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php b/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php index 466ce5a..38fd4c0 100644 --- a/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php @@ -101,7 +101,7 @@ class SliderProcessor implements DataProcessorInterface */ protected function getParentPageWithSlides() { - $rootlineUtility = new RootlineUtility($GLOBALS['TSFE']->id); + $rootlineUtility = new RootlineUtility($GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.page.information')->getId()); $rootline = $rootlineUtility->get(); foreach ($rootline as $parentPage) { diff --git a/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php b/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php index 1cbd7e2..0678176 100644 --- a/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/TeaserProcessor.php @@ -26,8 +26,10 @@ namespace EP\EpTheme\DataProcessing; * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ - -use EP\EpProducts\Domain\Model\FilterSettings; +use EP\EpProducts\Domain\Model\City; +use EP\EpProducts\Domain\Model\Region; +use EP\EpProducts\Domain\Model\Country; +use EP\EpProducts\Domain\Model\Concept; use EP\EpProducts\Domain\Repository\CityRepository; use EP\EpProducts\Domain\Repository\ConceptRepository; use EP\EpProducts\Domain\Repository\CountryRepository; @@ -60,37 +62,37 @@ class TeaserProcessor implements DataProcessorInterface $objectManager = GeneralUtility::makeInstance(ObjectManager::class); if ((int) $processedData['data']['tx_eptheme_context_city'] > 0) { - /** @var \EP\EpProducts\Domain\Repository\CityRepository $repository */ + /** @var CityRepository $repository */ $repository = $objectManager->get(CityRepository::class); - /** @var \EP\EpProducts\Domain\Model\City $city */ + /** @var City $city */ $city = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_city']); $processedData['city'] = $city; } if ((int) $processedData['data']['tx_eptheme_context_region'] > 0) { - /** @var \EP\EpProducts\Domain\Repository\RegionRepository $repository */ + /** @var RegionRepository $repository */ $repository = $objectManager->get(RegionRepository::class); - /** @var \EP\EpProducts\Domain\Model\Region $region */ + /** @var Region $region */ $region = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_region']); $processedData['region'] = $region; } if ((int) $processedData['data']['tx_eptheme_context_country'] > 0) { - /** @var \EP\EpProducts\Domain\Repository\CountryRepository $repository */ + /** @var CountryRepository $repository */ $repository = $objectManager->get(CountryRepository::class); - /** @var \EP\EpProducts\Domain\Model\Country $country */ + /** @var Country $country */ $country = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_country']); $processedData['country'] = $country; } if ((int) $processedData['data']['tx_eptheme_context_hotel'] > 0) { - /** @var \EP\EpProducts\Service\HotelDataService $service */ + /** @var HotelDataService $service */ $service = $objectManager->get(HotelDataService::class); /** @var array $hotel */ $hotel = $service->getTeaser($processedData['data']['tx_eptheme_context_hotel']); $processedData['hotel'] = $hotel; } if ((int) $processedData['data']['tx_eptheme_context_concept'] > 0) { - /** @var \EP\EpProducts\Domain\Repository\ConceptRepository $repository */ + /** @var ConceptRepository $repository */ $repository = $objectManager->get(ConceptRepository::class); - /** @var \EP\EpProducts\Domain\Model\Concept $concept */ + /** @var Concept $concept */ $concept = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_concept']); $processedData['concept'] = $concept; } @@ -116,13 +118,13 @@ class TeaserProcessor implements DataProcessorInterface $filterSettings['dateTo'] = $dateTo->format('Y-m-d'); } - /** @var \EP\EpProducts\Service\ProductDataService $productDataService */ + /** @var ProductDataService $productDataService */ $productDataService = $objectManager->get(ProductDataService::class); $processedData['teaser'] = $productDataService->getTeaser($filterSettings); $processedData['teaser']['forceHotelUid'] = $hotelUid; } - $processedData['referringPageUid'] = $GLOBALS['TSFE']->id; + $processedData['referringPageUid'] = $GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.page.information')->getId(); return $processedData; } diff --git a/packages/ep_theme/Classes/Domain/Model/Page.php b/packages/ep_theme/Classes/Domain/Model/Page.php index d028e9d..cd74a2f 100644 --- a/packages/ep_theme/Classes/Domain/Model/Page.php +++ b/packages/ep_theme/Classes/Domain/Model/Page.php @@ -9,12 +9,12 @@ class Page extends AbstractEntity /** * @var int */ - protected $uid; + protected ?int $uid = null; /** * @var int */ - protected $pid; + protected ?int $pid = null; /** * @var bool diff --git a/packages/ep_theme/Classes/MetaTag/OpenGraphMetaTagManager.php b/packages/ep_theme/Classes/MetaTag/OpenGraphMetaTagManager.php index 52bc792..076ae60 100644 --- a/packages/ep_theme/Classes/MetaTag/OpenGraphMetaTagManager.php +++ b/packages/ep_theme/Classes/MetaTag/OpenGraphMetaTagManager.php @@ -55,7 +55,7 @@ class OpenGraphMetaTagManager extends \TYPO3\CMS\Seo\MetaTag\OpenGraphMetaTagMan */ protected function getPageWithImage() { - $rootLineUtility = new RootlineUtility($GLOBALS['TSFE']->id); + $rootLineUtility = new RootlineUtility($GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.page.information')->getId()); $rootLine = $rootLineUtility->get(); foreach ($rootLine as $page) { diff --git a/packages/ep_theme/Classes/ViewHelpers/ContainerViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/ContainerViewHelper.php index 1977186..cba62b3 100644 --- a/packages/ep_theme/Classes/ViewHelpers/ContainerViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/ContainerViewHelper.php @@ -29,12 +29,9 @@ namespace EP\EpTheme\ViewHelpers; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class ContainerViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - /** * @var int[] */ @@ -70,48 +67,36 @@ class ContainerViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) { - $content = $renderChildrenClosure(); - + public function render() + { + $content = $this->renderChildren(); if ($content === null) { - $content = $arguments['content']; + $content = $this->arguments['content']; } - $classes = []; - if (\in_array($arguments['data']['colPos'], static::$columnsWithoutContainers, false)) { + if (\in_array($this->arguments['data']['colPos'], static::$columnsWithoutContainers, false)) { $classes[] = 'container'; } - - if ($arguments['cssClasses'] !== null) { - $classes[] = $arguments['cssClasses']; + if ($this->arguments['cssClasses'] !== null) { + $classes[] = $this->arguments['cssClasses']; } - - if (!empty($arguments['data']['space_before_class'])) { - $scaleTop = static::$scale[$arguments['data']['space_before_class']]; + if (!empty($this->arguments['data']['space_before_class'])) { + $scaleTop = static::$scale[$this->arguments['data']['space_before_class']]; $classes[] = sprintf('pt-%d', $scaleTop); } - - if (!empty($arguments['data']['space_after_class'])) { - $scaleBottom = static::$scale[$arguments['data']['space_after_class']]; + if (!empty($this->arguments['data']['space_after_class'])) { + $scaleBottom = static::$scale[$this->arguments['data']['space_after_class']]; $classes[] = sprintf('pb-%d', $scaleBottom); } - - if ('default' !== $arguments['data']['frame_class']) { - $classes[] = $arguments['data']['frame_class']; + if ('default' !== $this->arguments['data']['frame_class']) { + $classes[] = $this->arguments['data']['frame_class']; } - if (count($classes) > 0) { - return sprintf('
%s
', implode(' ', $classes), $arguments['rteContent'] ? ' data-rte-content' : '', $content); + return sprintf('
%s
', implode(' ', $classes), $this->arguments['rteContent'] ? ' data-rte-content' : '', $content); } - - if ($arguments['rteContent']) { + if ($this->arguments['rteContent']) { return sprintf('
%s
', $content); } - return $content; } } diff --git a/packages/ep_theme/Classes/ViewHelpers/FilterSettingsEncoderViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/FilterSettingsEncoderViewHelper.php index aba18bc..9fcb3bf 100644 --- a/packages/ep_theme/Classes/ViewHelpers/FilterSettingsEncoderViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/FilterSettingsEncoderViewHelper.php @@ -30,12 +30,9 @@ namespace EP\EpTheme\ViewHelpers; use EP\EpProducts\Service\FilterSettingsEncoder; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class FilterSettingsEncoderViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - /** * @var bool */ @@ -54,22 +51,16 @@ class FilterSettingsEncoderViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) + public function render() { - $argument = $renderChildrenClosure(); + $argument = $this->renderChildren(); if ($argument === null) { - $argument = $arguments['argument']; + $argument = $this->arguments['argument']; } if ($argument === null) { return ''; } - $encoder = new FilterSettingsEncoder(); - return $encoder->encode($argument); } } diff --git a/packages/ep_theme/Classes/ViewHelpers/GmapsUrlViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/GmapsUrlViewHelper.php index 3d4d1dd..7f8f17b 100644 --- a/packages/ep_theme/Classes/ViewHelpers/GmapsUrlViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/GmapsUrlViewHelper.php @@ -31,12 +31,9 @@ use EP\EpProducts\Domain\Model\Hotel; use EP\EpProducts\Domain\Model\Region; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class GmapsUrlViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - /** * @var bool */ @@ -60,14 +57,10 @@ class GmapsUrlViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) + public function render() { - $hotel = $arguments['hotel']; - $region = $arguments['region']; + $hotel = $this->arguments['hotel']; + $region = $this->arguments['region']; if ($hotel !== null && $hotel->getLatitude() && $hotel->getLongitude()) { $source = $hotel; } elseif ($hotel !== null && $hotel->getRegion()->getLatitude() && $hotel->getRegion()->getLongitude()) { @@ -77,7 +70,7 @@ class GmapsUrlViewHelper extends AbstractViewHelper } else { return 'http://www.google.de/maps'; } - return sprintf(static::URLBASE, $source->getLatitude(), $source->getLongitude(), $arguments['type'], $arguments['zoom']); + return sprintf(static::URLBASE, $source->getLatitude(), $source->getLongitude(), $this->arguments['type'], $this->arguments['zoom']); } } diff --git a/packages/ep_theme/Classes/ViewHelpers/IconViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/IconViewHelper.php index 0bcb8ae..4fd428a 100644 --- a/packages/ep_theme/Classes/ViewHelpers/IconViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/IconViewHelper.php @@ -16,8 +16,6 @@ class IconViewHelper extends AbstractTagBasedViewHelper public function initializeArguments() { parent::initializeArguments(); - - $this->registerUniversalTagAttributes(); $this->registerArgument('icon', 'string', 'Icon name', true); } diff --git a/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php index bd6a874..82be711 100644 --- a/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/MyEpUrlViewHelper.php @@ -6,23 +6,17 @@ use EP\EpProducts\Service\MyEpUrlResolverService; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class MyEpUrlViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - /** * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * @return string */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ): string { + public function render(): string + { return GeneralUtility::makeInstance(MyEpUrlResolverService::class)->resolve(); } } diff --git a/packages/ep_theme/Classes/ViewHelpers/NightsOptionsViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/NightsOptionsViewHelper.php index 3df535c..d742248 100644 --- a/packages/ep_theme/Classes/ViewHelpers/NightsOptionsViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/NightsOptionsViewHelper.php @@ -29,12 +29,9 @@ namespace EP\EpTheme\ViewHelpers; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class NightsOptionsViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - public function initializeArguments() { parent::initializeArguments(); @@ -49,16 +46,12 @@ class NightsOptionsViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) + public function render() { - if ($arguments['daytrip']) { + if ($this->arguments['daytrip']) { return 'Tageweise buchbar'; } - $options = $arguments['options']; + $options = $this->arguments['options']; if ($options === null) { return ''; } @@ -74,7 +67,6 @@ class NightsOptionsViewHelper extends AbstractViewHelper $output = $lastOption; } $output .= (int) $lastOption > 1 ? ' Nächte' : ' Nacht'; - return $output; } diff --git a/packages/ep_theme/Classes/ViewHelpers/RatingViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/RatingViewHelper.php index b1df2f0..f253073 100644 --- a/packages/ep_theme/Classes/ViewHelpers/RatingViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/RatingViewHelper.php @@ -30,12 +30,9 @@ namespace EP\EpTheme\ViewHelpers; use EP\EpProducts\Domain\Model\Product; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class RatingViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - /** * @var bool */ @@ -54,22 +51,17 @@ class RatingViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) + public function render() { - $product = $renderChildrenClosure(); + $product = $this->renderChildren(); if ($product === null) { - $product = $arguments['product']; + $product = $this->arguments['product']; } $ratingAverage = $product->getRatingAverage(); $ratingVotesCount = $product->getRatingVotesCount(); $fullStars = floor($ratingAverage); $halfStar = ($ratingAverage - $fullStars) > 0; $ratingAverageLabel = number_format($ratingAverage, 1, ',', '.'); - $content = ''; for ($i = 1; $i <= $fullStars; $i++) { @@ -79,7 +71,6 @@ class RatingViewHelper extends AbstractViewHelper $content .= ''; } $content .= sprintf('%s Sterne (%d)', $ratingAverageLabel, $ratingVotesCount); - return $content; } diff --git a/packages/ep_theme/Classes/ViewHelpers/ThemeClassesViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/ThemeClassesViewHelper.php index b61219d..d23a39f 100644 --- a/packages/ep_theme/Classes/ViewHelpers/ThemeClassesViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/ThemeClassesViewHelper.php @@ -29,12 +29,9 @@ namespace EP\EpTheme\ViewHelpers; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class ThemeClassesViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - public function initializeArguments() { parent::initializeArguments(); @@ -49,18 +46,12 @@ class ThemeClassesViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) + public function render() { - $themeKey = $arguments['key']; - - if (!array_key_exists($themeKey, $arguments['classes'])) { + $themeKey = $this->arguments['key']; + if (!array_key_exists($themeKey, $this->arguments['classes'])) { return ''; } - - return $arguments['classes'][$themeKey]; + return $this->arguments['classes'][$themeKey]; } } diff --git a/packages/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php index 4b9aa8c..1997684 100644 --- a/packages/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php @@ -70,7 +70,7 @@ class AjaxViewHelper extends ActionViewHelper // Use root page uid as target unless provided if ($arguments['pageUid'] === null) { - $rootlineUtility = new RootlineUtility($GLOBALS['TSFE']->id); + $rootlineUtility = new RootlineUtility($GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.page.information')->getId()); $rootline = $rootlineUtility->get(); $rootPage = array_pop($rootline); $arguments['pageUid'] = $rootPage['uid']; diff --git a/packages/ep_theme/Classes/ViewHelpers/Uri/ProductViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Uri/ProductViewHelper.php index 0d24fd3..027bddf 100644 --- a/packages/ep_theme/Classes/ViewHelpers/Uri/ProductViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/Uri/ProductViewHelper.php @@ -29,12 +29,9 @@ namespace EP\EpTheme\ViewHelpers\Uri; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class ProductViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - public function initializeArguments() { parent::initializeArguments(); @@ -53,25 +50,21 @@ class ProductViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) { - $product = $arguments['product']; - $hotel = $arguments['hotel']; - - if ($arguments['forceHotelUid']) { + public function render() + { + $product = $this->arguments['product']; + $hotel = $this->arguments['hotel']; + if ($this->arguments['forceHotelUid']) { // Product detail page with forced hotel $linkArguments = [ 'product' => is_array($product) ? $product['uid'] : $product, 'hotel' => is_array($hotel) ? $hotel['uid'] : $hotel, ]; - } elseif ($arguments['dateFrom'] || $arguments['dateTo']) { + } elseif ($this->arguments['dateFrom'] || $this->arguments['dateTo']) { // Product detail page with forced date range $linkArguments = [ - 'dateFrom' => $arguments['dateFrom'], - 'dateTo' => $arguments['dateTo'], + 'dateFrom' => $this->arguments['dateFrom'], + 'dateTo' => $this->arguments['dateTo'], ]; } else { // Default product detail page by product uid @@ -79,24 +72,20 @@ class ProductViewHelper extends AbstractViewHelper 'product' => is_array($product) ? $product['uid'] : $product, ]; } - $targetPageUid = is_array($product) ? (int)$product['detailPage'] : $product->getDetailPage(); - - $uri = $renderingContext + $uri = $this->renderingContext ->getControllerContext() ->getUriBuilder() ->reset() ->setTargetPageUid($targetPageUid) ->uriFor('detail', $linkArguments, 'Product', 'epproducts', 'product_detail') ; - - if ($arguments['ref']) { - $referringPageUri = urlencode($arguments['ref']); + if ($this->arguments['ref']) { + $referringPageUri = urlencode($this->arguments['ref']); $hasQuery = null !== parse_url($uri, PHP_URL_QUERY); $separator = $hasQuery ? '&' : '?'; $uri .= $separator . 'ref=' . $referringPageUri; } - return $uri; } diff --git a/packages/ep_theme/Classes/ViewHelpers/Uri/VideoViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Uri/VideoViewHelper.php index 5811b0c..3b4e777 100644 --- a/packages/ep_theme/Classes/ViewHelpers/Uri/VideoViewHelper.php +++ b/packages/ep_theme/Classes/ViewHelpers/Uri/VideoViewHelper.php @@ -29,12 +29,9 @@ namespace EP\EpTheme\ViewHelpers\Uri; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; class VideoViewHelper extends AbstractViewHelper { - use CompileWithRenderStatic; - /** * @var bool */ @@ -54,21 +51,16 @@ class VideoViewHelper extends AbstractViewHelper * @param RenderingContextInterface $renderingContext * @return mixed */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) + public function render() { // YouTube - if ((int) $arguments['layout'] === 0) { - return $arguments['value'] . '?rel=0&controls=0&showinfo=0'; + if ((int) $this->arguments['layout'] === 0) { + return $this->arguments['value'] . '?rel=0&controls=0&showinfo=0'; } // Vimeo - if ((int) $arguments['layout'] === 1) { - return sprintf('https://player.vimeo.com/video/%d?html5=1', $arguments['value']); + if ((int) $this->arguments['layout'] === 1) { + return sprintf('https://player.vimeo.com/video/%d?html5=1', $this->arguments['value']); } - return ''; } diff --git a/packages/ep_theme/Configuration/Extbase/Persistence/Classes.php b/packages/ep_theme/Configuration/Extbase/Persistence/Classes.php index 347a25e..ff0c4c2 100644 --- a/packages/ep_theme/Configuration/Extbase/Persistence/Classes.php +++ b/packages/ep_theme/Configuration/Extbase/Persistence/Classes.php @@ -2,8 +2,10 @@ declare(strict_types = 1); +use EP\EpTheme\Domain\Model\Page; + return [ - \EP\EpTheme\Domain\Model\Page::class => [ + Page::class => [ 'tableName' => 'pages', ], ]; diff --git a/packages/ep_theme/Configuration/TCA/Overrides/pages.php b/packages/ep_theme/Configuration/TCA/Overrides/pages.php index dc6d891..4097e24 100644 --- a/packages/ep_theme/Configuration/TCA/Overrides/pages.php +++ b/packages/ep_theme/Configuration/TCA/Overrides/pages.php @@ -1,6 +1,8 @@ 'tx_epproducts_domain_model_country', 'foreign_table_where' => 'ORDER BY name', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -45,7 +47,7 @@ call_user_func(function() { 'foreign_table' => 'tx_epproducts_domain_model_region', 'foreign_table_where' => 'ORDER BY name', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -113,7 +115,7 @@ call_user_func(function() { 'foreign_table' => 'tx_epproducts_domain_model_badge', 'foreign_table_where' => 'ORDER BY title', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'minitems' => 0, 'maxitems' => 1, @@ -121,12 +123,12 @@ call_user_func(function() { ], ]; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns( + ExtensionManagementUtility::addTCAcolumns( 'pages', $temporaryColumns ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( + ExtensionManagementUtility::addToAllTCAtypes( 'pages', '--div--;Kontext, tx_eptheme_context_pacode,tx_eptheme_context_country,tx_eptheme_context_region, @@ -138,7 +140,7 @@ call_user_func(function() { '1,4' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile( + ExtensionManagementUtility::registerPageTSConfigFile( 'ep_theme', 'Configuration/TSconfig/Page/Main.tsconfig', 'EP Theme' diff --git a/packages/ep_theme/Configuration/TCA/Overrides/sys_file.php b/packages/ep_theme/Configuration/TCA/Overrides/sys_file.php index 24bc1d9..4922275 100644 --- a/packages/ep_theme/Configuration/TCA/Overrides/sys_file.php +++ b/packages/ep_theme/Configuration/TCA/Overrides/sys_file.php @@ -1,5 +1,7 @@ [ @@ -7,4 +9,4 @@ $tca = [ ], ]; -\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['sys_file'], $tca); \ No newline at end of file +ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['sys_file'], $tca); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/sys_template.php b/packages/ep_theme/Configuration/TCA/Overrides/sys_template.php index 495a32d..3644f9f 100644 --- a/packages/ep_theme/Configuration/TCA/Overrides/sys_template.php +++ b/packages/ep_theme/Configuration/TCA/Overrides/sys_template.php @@ -1,10 +1,12 @@ 'input', 'default' => 'Details', 'size' => 30, - 'eval' => 'trim,required' + 'eval' => 'trim', + 'required' => true ], ], 'tx_eptheme_context_country' => [ @@ -24,7 +27,7 @@ call_user_func(function () { 'foreign_table' => 'tx_epproducts_domain_model_country', 'foreign_table_where' => 'ORDER BY name ASC', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'default' => 0, 'minitems' => 0, @@ -40,7 +43,7 @@ call_user_func(function () { 'foreign_table' => 'tx_epproducts_domain_model_region', 'foreign_table_where' => 'ORDER BY name ASC', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'default' => 0, 'minitems' => 0, @@ -56,7 +59,7 @@ call_user_func(function () { 'foreign_table' => 'tx_epproducts_domain_model_city', 'foreign_table_where' => 'ORDER BY name ASC', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'default' => 0, 'minitems' => 0, @@ -72,7 +75,7 @@ call_user_func(function () { 'foreign_table' => 'tx_epproducts_domain_model_hotel', 'foreign_table_where' => 'ORDER BY name ASC', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'default' => 0, 'minitems' => 0, @@ -88,7 +91,7 @@ call_user_func(function () { 'foreign_table' => 'tx_epproducts_domain_model_concept', 'foreign_table_where' => 'ORDER BY name ASC', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'default' => 0, 'minitems' => 0, @@ -104,7 +107,7 @@ call_user_func(function () { 'foreign_table' => 'tx_epproducts_domain_model_product', 'foreign_table_where' => 'ORDER BY name_internal, name ASC', 'items' => [ - ['Keine Zuordnung', 0], + ['label' => 'Keine Zuordnung', 'value' => 0], ], 'default' => 0, 'minitems' => 0, @@ -115,20 +118,18 @@ call_user_func(function () { 'exclude' => 0, 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_context.date_from', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 12, - 'eval' => 'date,int', - 'renderType' => 'inputDateTime', + 'format' => 'date', ] ], 'tx_eptheme_context_date_to' => [ 'exclude' => 0, 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_context.date_to', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 12, - 'eval' => 'date,int', - 'renderType' => 'inputDateTime', + 'format' => 'date', ] ], 'tx_eptheme_background' => [ @@ -139,18 +140,18 @@ call_user_func(function () { 'renderType' => 'selectSingle', 'default' => 0, 'items' => [ - [ 'ohne', 0 ], - [ 'oben', 1 ], - [ 'unten', 2 ], - [ 'oben und unten', 3 ], + [ 'label' => 'ohne', 'value' => 0 ], + [ 'label' => 'oben', 'value' => 1 ], + [ 'label' => 'unten', 'value' => 2 ], + [ 'label' => 'oben und unten', 'value' => 3 ], ], ], ], ]; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $ttContentColumns); + ExtensionManagementUtility::addTCAcolumns('tt_content', $ttContentColumns); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette( + ExtensionManagementUtility::addFieldsToPalette( 'tt_content', 'header', '--linebreak--, diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_button.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_button.php index 442fb58..52ecf04 100644 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_button.php +++ b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_button.php @@ -1,23 +1,25 @@ 'Button', + 'value' => 'button', + 'icon' => 'content-image' ], 'ytvideo', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette( + ExtensionManagementUtility::addFieldsToPalette( 'tt_content', 'tx_eptheme_button', 'header,header_link' diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_container.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_container.php index 14d1ddb..cb46c7b 100644 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_container.php +++ b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_container.php @@ -1,8 +1,12 @@ configureContainer( - new \B13\Container\Tca\ContainerConfiguration( + GeneralUtility::makeInstance(Registry::class)->configureContainer( + new ContainerConfiguration( 'ep_container_quarters', 'Vierspalter', '25/25/25/25 Aufteilung mit groß/klein Umschaltung', @@ -14,8 +18,8 @@ call_user_func(function () { ) ); - \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer( - new \B13\Container\Tca\ContainerConfiguration( + GeneralUtility::makeInstance(Registry::class)->configureContainer( + new ContainerConfiguration( 'ep_container_teasergroup', 'Dreispalter', '33/33/33 Aufteilung mit groß/klein Umschaltung', diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_teaser.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_teaser.php index 1fec92c..d8116dd 100644 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_teaser.php +++ b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_teaser.php @@ -1,101 +1,103 @@ 'Teaser allgemein', + 'value' => 'teaser', + 'icon' => 'content-image' ], 'textmedia', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', [ - 'Teaser Land', - 'teaser_country', - 'content-image' + 'label' => 'Teaser Land', + 'value' => 'teaser_country', + 'icon' => 'content-image' ], 'teaser', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', [ - 'Teaser Gebiet', - 'teaser_region', - 'content-image' + 'label' => 'Teaser Gebiet', + 'value' => 'teaser_region', + 'icon' => 'content-image' ], 'teaser_country', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', [ - 'Teaser Ort', - 'teaser_city', - 'content-image' + 'label' => 'Teaser Ort', + 'value' => 'teaser_city', + 'icon' => 'content-image' ], 'teaser_region', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', [ - 'Teaser Hotel', - 'teaser_hotel', - 'content-image' + 'label' => 'Teaser Hotel', + 'value' => 'teaser_hotel', + 'icon' => 'content-image' ], 'teaser_city', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', [ - 'Teaser Konzept', - 'teaser_concept', - 'content-image' + 'label' => 'Teaser Konzept', + 'value' => 'teaser_concept', + 'icon' => 'content-image' ], 'teaser_hotel', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', [ - 'Teaser Produkt', - 'teaser_product', - 'content-image' + 'label' => 'Teaser Produkt', + 'value' => 'teaser_product', + 'icon' => 'content-image' ], 'teaser_concept', 'after' ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem( + ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', [ - 'Teaser Buchungslink', - 'teaser_booking_link', - 'content-image' + 'label' => 'Teaser Buchungslink', + 'value' => 'teaser_booking_link', + 'icon' => 'content-image' ], 'teaser_concept', 'after' @@ -130,7 +132,11 @@ call_user_func(function() { ], 'assets' => [ 'label' => 'Teaserbild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('assets', [ + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'], 'appearance' => [ 'createNewRelationLinkTitle' => 'Hinzufügen' ], @@ -163,7 +169,7 @@ call_user_func(function() { ], 'maxitems' => 1, 'minitems' => 0, - ], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']) + ] ] ] ]; diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tx_eptheme_domain_model_badge.php b/packages/ep_theme/Configuration/TCA/Overrides/tx_eptheme_domain_model_badge.php new file mode 100644 index 0000000..bc4aa20 --- /dev/null +++ b/packages/ep_theme/Configuration/TCA/Overrides/tx_eptheme_domain_model_badge.php @@ -0,0 +1,3 @@ + [ 'title' => 'Slide', @@ -6,7 +9,6 @@ return [ 'label' => 'headline', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'hideTable' => true, @@ -37,17 +39,7 @@ return [ 'sys_language_uid' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] - ], - ], + 'config' => ['type' => 'language'], ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', @@ -57,7 +49,7 @@ return [ 'default' => 0, 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'foreign_table' => 'tx_eptheme_domain_model_slide', 'foreign_table_where' => 'AND tx_eptheme_domain_model_slide.pid=###CURRENT_PID### AND tx_eptheme_domain_model_slide.sys_language_uid IN (-1,0)', @@ -89,30 +81,26 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'endtime' => [ 'exclude' => 0, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', + 'type' => 'datetime', 'size' => 13, - 'eval' => 'datetime', 'checkbox' => 0, 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], - 'renderType' => 'inputDateTime', ], ], 'sorting' => [ @@ -159,73 +147,73 @@ return [ 'exclude' => 0, 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_slide.page_uid', 'config' => [ - 'type' => 'input', + 'type' => 'link', 'size' => 20, - 'renderType' => 'inputLink', ] ], 'image' => [ 'exclude' => 0, 'label' => 'Bild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'images', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference', - 'fileUploadAllowed' => false, - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' + 'config' => [ + // TODO: Important! Verify that the fieldname value in foreign table either matches the column name + // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields + 'type' => 'file', + 'allowed' => 'jpg,jpeg', + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference', + 'fileUploadAllowed' => false, + ], + 'overrideChildTca' => [ + 'types' => [ + FileType::IMAGE->value => [ + 'showitem' => ' --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' - ], ], - 'columns' => [ - 'crop' => [ - 'config' => [ - 'cropVariants' => [ - 'default' => [ - 'title' => 'Alle Geräte', - 'allowedAspectRatios' => [ - 'contentSlider' => [ - 'title' => 'Content Slider/Galerie', - 'value' => 1.59, - ], - 'contentSliderProduct' => [ - 'title' => 'Content Slider/Galerie Produkttexte', - 'value' => 1.79069767, - ], - 'sliderProductHeader' => [ - 'title' => 'Slider Produkt-Header', - 'value' => 1.625, - ], - 'sliderPageHeader' => [ - 'title' => 'Slider Seiten-Header', - 'value' => 3.805, - ], - 'sliderPageHeaderHome' => [ - 'title' => 'Slider Seiten-Header Startseite', - 'value' => 1370 / 585, - ], - 'free' => [ - 'title' => 'Frei', - 'value' => 'NaN', - ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'contentSlider' => [ + 'title' => 'Content Slider/Galerie', + 'value' => 1.59, + ], + 'contentSliderProduct' => [ + 'title' => 'Content Slider/Galerie Produkttexte', + 'value' => 1.79069767, + ], + 'sliderProductHeader' => [ + 'title' => 'Slider Produkt-Header', + 'value' => 1.625, + ], + 'sliderPageHeader' => [ + 'title' => 'Slider Seiten-Header', + 'value' => 3.805, + ], + 'sliderPageHeaderHome' => [ + 'title' => 'Slider Seiten-Header Startseite', + 'value' => 1370 / 585, + ], + 'free' => [ + 'title' => 'Frei', + 'value' => 'NaN', ], ], - 'mobile' => [ - 'title' => 'Mobile', - 'allowedAspectRatios' => [ - 'sliderPageHeader' => [ - 'title' => 'Slider Seiten-Header', - 'value' => 1, - ], - 'free' => [ - 'title' => 'Frei', - 'value' => 'NaN', - ], + ], + 'mobile' => [ + 'title' => 'Mobile', + 'allowedAspectRatios' => [ + 'sliderPageHeader' => [ + 'title' => 'Slider Seiten-Header', + 'value' => 1, + ], + 'free' => [ + 'title' => 'Frei', + 'value' => 'NaN', ], ], ], @@ -233,11 +221,10 @@ return [ ], ], ], - 'maxitems' => 1, - 'minitems' => 1, ], - 'jpg,jpeg' - ), + 'maxitems' => 1, + 'minitems' => 1, + ], ], 'page' => [ 'exclude' => 0, diff --git a/packages/ep_theme/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts/FrontpageEvent.tsconfig b/packages/ep_theme/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts/FrontpageEvent.tsconfig index 0857aa8..433c79e 100644 --- a/packages/ep_theme/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts/FrontpageEvent.tsconfig +++ b/packages/ep_theme/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts/FrontpageEvent.tsconfig @@ -19,4 +19,3 @@ mod.web_layout.BackendLayouts { } } } - diff --git a/packages/ep_theme/Configuration/TSconfig/Page/TCEFORM.tsconfig b/packages/ep_theme/Configuration/TSconfig/Page/TCEFORM.tsconfig index 6256d8d..bf95d78 100644 --- a/packages/ep_theme/Configuration/TSconfig/Page/TCEFORM.tsconfig +++ b/packages/ep_theme/Configuration/TSconfig/Page/TCEFORM.tsconfig @@ -1,9 +1,9 @@ TCEFORM { tt_content { - CType { - # Remove content elements added by EXT:ep_events - removeItems := addToList(tile, statement, herounit, banner) - } + CType { + # Remove content elements added by EXT:ep_events + removeItems := addToList(tile, statement, herounit, banner) + } imageorient.removeItems := addToList(0,1,2,8,9,25,26) imageorient.disabled = 1 diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/list.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/list.typoscript index 192f9a7..e69f809 100644 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/list.typoscript +++ b/packages/ep_theme/Configuration/TypoScript/ContentElements/list.typoscript @@ -1,4 +1,3 @@ tt_content.list.dataProcessing { 10 = EP\EpTheme\DataProcessing\FlexFormProcessor } - diff --git a/packages/ep_theme/Configuration/TypoScript/Extensions/FluidStyledContent.typoscript b/packages/ep_theme/Configuration/TypoScript/Extensions/FluidStyledContent.typoscript index 9e6961f..35ac04b 100644 --- a/packages/ep_theme/Configuration/TypoScript/Extensions/FluidStyledContent.typoscript +++ b/packages/ep_theme/Configuration/TypoScript/Extensions/FluidStyledContent.typoscript @@ -11,4 +11,3 @@ lib.contentElement { settings.mapApiKey = {$plugin.tx_eptheme.settings.mapApiKey} settings.mapAttribution = {$plugin.tx_eptheme.settings.mapAttribution} } - diff --git a/packages/ep_theme/Configuration/TypoScript/Extensions/Seo.typoscript b/packages/ep_theme/Configuration/TypoScript/Extensions/Seo.typoscript index 3f7ece8..0479241 100644 --- a/packages/ep_theme/Configuration/TypoScript/Extensions/Seo.typoscript +++ b/packages/ep_theme/Configuration/TypoScript/Extensions/Seo.typoscript @@ -15,4 +15,4 @@ plugin.tx_seo { } } } -[END] +[end] diff --git a/packages/ep_theme/Configuration/TypoScript/Library/Sitemap.typoscript b/packages/ep_theme/Configuration/TypoScript/Library/Sitemap.typoscript index 384d7e6..81561ac 100644 --- a/packages/ep_theme/Configuration/TypoScript/Library/Sitemap.typoscript +++ b/packages/ep_theme/Configuration/TypoScript/Library/Sitemap.typoscript @@ -2,9 +2,7 @@ lib.tue_sitemapcsv = COA_INT lib.tue_sitemapcsv { 5 = TEXT 5 { - value ( -"URL";"Latest change";"Doktype";"Title";"Nav Title";"Description" - ) + value = "URL";"Latest change";"Doktype";"Title";"Nav Title";"Description" } 10 = COA 10 { @@ -92,10 +90,7 @@ lib.tue_sitemapcsv { } 100 = TEXT 100 { - value ( - - - ) + value = } } 20 = HMENU @@ -119,17 +114,16 @@ lib.tue_sitemapcsv { } [backend.user.isLoggedIn] - sitemapcsv = PAGE - sitemapcsv { - typeNum = 888 - config { - disableAllHeaderCode = 1 - xhtml_cleaning = 0 - admPanel = 0 - debug = 0 - additionalHeaders = Content-type:text/csv;charset=utf-8|Content-Disposition:attachment; filename="sitemap.csv" - } - 10 < lib.tue_sitemapcsv +sitemapcsv = PAGE +sitemapcsv { + typeNum = 888 + config { + disableAllHeaderCode = 1 + xhtml_cleaning = 0 + admPanel = 0 + debug = 0 + additionalHeaders = Content-type:text/csv;charset=utf-8|Content-Disposition:attachment; filename="sitemap.csv" } -[END] - + 10 < lib.tue_sitemapcsv +} +[end] diff --git a/packages/ep_theme/Configuration/TypoScript/Page/Main.typoscript b/packages/ep_theme/Configuration/TypoScript/Page/Main.typoscript index 42aacca..3c9b39c 100644 --- a/packages/ep_theme/Configuration/TypoScript/Page/Main.typoscript +++ b/packages/ep_theme/Configuration/TypoScript/Page/Main.typoscript @@ -188,24 +188,24 @@ page { } } -[page["backend_layout"] == 'pagets__popup'] - page.bodyTagCObject > - page.bodyTagCObject = TEXT - page.bodyTagCObject.value = - page.headerData.333 > +[traverse(page, "backend_layout") == 'pagets__popup'] +page.bodyTagCObject > +page.bodyTagCObject = TEXT +page.bodyTagCObject.value = +page.headerData.333 > # page.headerData.990 > # page.headerData.995 > [end] -[page["backend_layout"] == 'pagets__travelinfo'] - page.bodyTagCObject > - page.bodyTagCObject = TEXT - page.bodyTagCObject.value = +[traverse(page, "backend_layout") == 'pagets__travelinfo'] +page.bodyTagCObject > +page.bodyTagCObject = TEXT +page.bodyTagCObject.value = [end] [request.getNormalizedParams() && like(request.getNormalizedParams().getHttpUserAgent(), "*Googlebot*")] - page.headerData.990 > - page.headerData.995 > +page.headerData.990 > +page.headerData.995 > [end] #[applicationContext == "Development" || applicationContext == "Production/Staging"] diff --git a/packages/ep_theme/Configuration/TypoScript/setup.typoscript b/packages/ep_theme/Configuration/TypoScript/setup.typoscript index 3c8025e..7db97cb 100644 --- a/packages/ep_theme/Configuration/TypoScript/setup.typoscript +++ b/packages/ep_theme/Configuration/TypoScript/setup.typoscript @@ -100,15 +100,13 @@ tt_content.menu_section.dataProcessing.10.includeNotInMenu = 1 config { compressJs = 1 compressCss = 1 - typolinkCheckRootline = 1 - typolinkEnableLinksAcrossDomains = 1 sendCacheHeaders = 1 content_from_pid_allowOutsideDomain = 1 inlineStyle2TempFile = 0 additionalHeaders { -# 10 { -# header = Content-Security-Policy: default-src 'self' 'unsafe-inline'; connect-src 'self' https://my.ep-reisen.de/; -# } + # 10 { + # header = Content-Security-Policy: default-src 'self' 'unsafe-inline'; connect-src 'self' https://my.ep-reisen.de/; + # } 20 { header = Strict-Transport-Security: max-age=31536000; includeSubDomains; preload } diff --git a/packages/ep_theme/Resources/Private/Language/de.locallang.xlf b/packages/ep_theme/Resources/Private/Language/de.locallang.xlf index 5ecbc1e..1e8e1bc 100644 --- a/packages/ep_theme/Resources/Private/Language/de.locallang.xlf +++ b/packages/ep_theme/Resources/Private/Language/de.locallang.xlf @@ -1,7 +1,6 @@ - +
@@ -31,7 +30,6 @@ Link - Details @@ -71,14 +69,12 @@ Youtube URL - Datum von Datum bis - Bitte angeben @@ -97,14 +93,12 @@ Bitte gib eine gültige E-Mail Adresse an - Bitte wähle mindestens einen Newsletter Bitte stimme den Datenschutzbestimmungen zu - Nummer einfach als neuen Kontakt abspeichern und los geht es! Wir beraten Dich über WhatsApp! diff --git a/packages/ep_theme/Resources/Private/Language/locallang.xlf b/packages/ep_theme/Resources/Private/Language/locallang.xlf index 8c0d32c..7bde89b 100644 --- a/packages/ep_theme/Resources/Private/Language/locallang.xlf +++ b/packages/ep_theme/Resources/Private/Language/locallang.xlf @@ -30,7 +30,6 @@ Link - Details @@ -70,14 +69,12 @@ Youtube URL - Datum von Datum bis - Bitte angeben @@ -123,7 +120,6 @@ Deine Bestätigung ist erforderlich - Nummer einfach als neuen Kontakt abspeichern und los geht es! Wir beraten Dich über WhatsApp! diff --git a/packages/ep_theme/ext_emconf.php b/packages/ep_theme/ext_emconf.php index 0f46223..15d6157 100644 --- a/packages/ep_theme/ext_emconf.php +++ b/packages/ep_theme/ext_emconf.php @@ -7,11 +7,7 @@ $EM_CONF[$_EXTKEY] = [ 'author' => 'Björn Fromme', 'author_email' => 'fromme@dreipunktnull.com', 'state' => 'beta', - 'internal' => '', - 'uploadfolder' => true, - 'createDirs' => '', 'dividers2tabs' => true, - 'clearCacheOnLoad' => 0, 'version' => '3.0.0', 'constraints' => [ 'depends' => [], diff --git a/packages/ep_theme/ext_localconf.php b/packages/ep_theme/ext_localconf.php index bf30333..ff3e807 100644 --- a/packages/ep_theme/ext_localconf.php +++ b/packages/ep_theme/ext_localconf.php @@ -1,11 +1,14 @@ registerManager( 'ep_opengraph', - \EP\EpTheme\MetaTag\OpenGraphMetaTagManager::class + OpenGraphMetaTagManager::class ); }; diff --git a/packages/ep_theme/ext_tables.php b/packages/ep_theme/ext_tables.php index 66e68cb..b3ed6d7 100644 --- a/packages/ep_theme/ext_tables.php +++ b/packages/ep_theme/ext_tables.php @@ -1,6 +1,10 @@ registerIcon( 'content-ep_theme-ce', - \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + SvgIconProvider::class, ['source' => 'EXT:ep_theme/Resources/Public/images/logo.svg'] ); }