From 7acd771f6507aa6ce80fe914526b606d18d459cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Wed, 27 Oct 2021 10:44:53 +0200 Subject: [PATCH] Cache image service results --- .../Classes/Service/AbstractImageService.php | 7 +- .../Classes/Service/HotelDataService.php | 17 +- .../Classes/Service/HotelImageService.php | 7 +- .../Classes/Service/ProductDataService.php | 11 +- .../Classes/Service/ProductImageService.php | 7 +- .../ep_products/Configuration/Services.yaml | 27 + .../ext/ep_products/ext_localconf.php | 657 +++++++++--------- .../FluidStyledContent/TeaserCountry.html | 9 +- .../typo3conf/ext/ep_theme/ext_localconf.php | 92 +-- 9 files changed, 414 insertions(+), 420 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Service/AbstractImageService.php b/public/typo3conf/ext/ep_products/Classes/Service/AbstractImageService.php index e7847705..070d038b 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/AbstractImageService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/AbstractImageService.php @@ -1,6 +1,6 @@ table.$uid; + $key = sprintf('images-%s-%d', $this->table, $uid); if (false === ($value = $this->cache->get($key))) { $original = $this->fileRepository->findByRelation( $this->table, diff --git a/public/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php b/public/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php index f4b71e9a..12a06d05 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php @@ -45,26 +45,14 @@ class HotelDataService implements SingletonInterface */ protected $hotelImageService; - /** - * @var FlagIconService - */ - protected $flagIconService; - /** * @param HotelRepository $hotelRepository * @param HotelImageService $hotelImageService - * @param FlagIconService $flagIconService */ - public function __construct - ( - HotelRepository $hotelRepository, - HotelImageService $hotelImageService, - FlagIconService $flagIconService - ) + public function __construct(HotelRepository $hotelRepository, HotelImageService $hotelImageService) { $this->hotelRepository = $hotelRepository; $this->hotelImageService = $hotelImageService; - $this->flagIconService = $flagIconService; } /** @@ -111,7 +99,6 @@ class HotelDataService implements SingletonInterface 'country' => [ 'name' => $hotelData['country'], 'code' => $hotelData['countryCode'], - 'flag' => $this->flagIconService->getImage($hotelData['countryCode']), ], 'region' => [ 'name' => $hotelData['regionName'], @@ -171,7 +158,6 @@ class HotelDataService implements SingletonInterface 'country' => [ 'name' => $row['country'], 'code' => $row['countryCode'], - 'flag' => $this->flagIconService->getImage($row['countryCode']), ], 'region' => [ 'name' => $row['regionName'], @@ -228,7 +214,6 @@ class HotelDataService implements SingletonInterface 'country' => [ 'name' => $row['country'], 'code' => $row['countryCode'], - 'flag' => $this->flagIconService->getImage($row['countryCode']), ], 'available' => 0, 'board' => $row['board'], diff --git a/public/typo3conf/ext/ep_products/Classes/Service/HotelImageService.php b/public/typo3conf/ext/ep_products/Classes/Service/HotelImageService.php index c9718d5f..7d27fbbd 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/HotelImageService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/HotelImageService.php @@ -26,13 +26,8 @@ namespace EP\EpProducts\Service; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -use EP\EpProducts\Traits\ImageServiceTrait; -use TYPO3\CMS\Core\SingletonInterface; - -class HotelImageService implements SingletonInterface +class HotelImageService extends AbstractImageService { - use ImageServiceTrait; - /** * @var string */ diff --git a/public/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php b/public/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php index ea577785..232d6d36 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php @@ -54,31 +54,23 @@ class ProductDataService implements SingletonInterface */ protected $hotelImageService; - /** - * @var FlagIconService - */ - protected $flagIconService; - /** * @param ProductRepository $productRepository * @param HotelRepository $hotelRepository * @param HotelImageService $hotelImageService * @param ProductImageService $productImageService - * @param FlagIconService $flagIconService */ public function __construct( ProductRepository $productRepository, HotelRepository $hotelRepository, HotelImageService $hotelImageService, - ProductImageService $productImageService, - FlagIconService $flagIconService + ProductImageService $productImageService ) { $this->productRepository = $productRepository; $this->hotelRepository = $hotelRepository; $this->productImageService = $productImageService; $this->hotelImageService = $hotelImageService; - $this->flagIconService = $flagIconService; } /** @@ -221,7 +213,6 @@ class ProductDataService implements SingletonInterface 'country' => [ 'name' => $teaserData['countryName'], 'code' => $teaserData['countryCode'], - 'flag' => $this->flagIconService->getImage($teaserData['countryCode']), ], 'region' => [ 'name' => $teaserData['regionName'], diff --git a/public/typo3conf/ext/ep_products/Classes/Service/ProductImageService.php b/public/typo3conf/ext/ep_products/Classes/Service/ProductImageService.php index b5892345..f23da27b 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/ProductImageService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/ProductImageService.php @@ -26,13 +26,8 @@ namespace EP\EpProducts\Service; * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ -use EP\EpProducts\Traits\ImageServiceTrait; -use TYPO3\CMS\Core\SingletonInterface; - -class ProductImageService implements SingletonInterface +class ProductImageService extends AbstractImageService { - use ImageServiceTrait; - /** * @var string */ diff --git a/public/typo3conf/ext/ep_products/Configuration/Services.yaml b/public/typo3conf/ext/ep_products/Configuration/Services.yaml index 27693a7f..4c8bd98a 100644 --- a/public/typo3conf/ext/ep_products/Configuration/Services.yaml +++ b/public/typo3conf/ext/ep_products/Configuration/Services.yaml @@ -1,6 +1,33 @@ services: + _defaults: + autowire: true + autoconfigure: true + public: false + + EP\EpProducts\: + resource: '../Classes/*' + exclude: '../Classes/Domain/Model/*' + EP\EpProducts\EventListener\SystemInformationToolbarListener: tags: - name: event.listener identifier: 'epToolbarListener' event: TYPO3\CMS\Backend\Backend\Event\SystemInformationToolbarCollectorEvent + + cache.ep_cache: + class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface + public: true + factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache'] + arguments: ['ep_products_cache'] + + EP\EpProducts\Service\HotelImageService: + arguments: + $fileRepository: '@TYPO3\CMS\Core\Resource\FileRepository' + $imageService: '@TYPO3\CMS\Extbase\Service\ImageService' + $cache: '@cache.ep_cache' + + EP\EpProducts\Service\ProductImageService: + arguments: + $fileRepository: '@TYPO3\CMS\Core\Resource\FileRepository' + $imageService: '@TYPO3\CMS\Extbase\Service\ImageService' + $cache: '@cache.ep_cache' diff --git a/public/typo3conf/ext/ep_products/ext_localconf.php b/public/typo3conf/ext/ep_products/ext_localconf.php index 682fbf07..e3842edf 100644 --- a/public/typo3conf/ext/ep_products/ext_localconf.php +++ b/public/typo3conf/ext/ep_products/ext_localconf.php @@ -1,343 +1,340 @@ 'ep_products', - 'title' => 'EP Reisedaten Import', - 'description' => 'Importiert Reisedaten aus busProNet', -]; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\Task\ImportDatesTask::class] = [ + 'extension' => 'ep_products', + 'title' => 'EP Reisedaten Import', + 'description' => 'Importiert Reisedaten aus busProNet', + ]; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\Task\ImportContingentsTask::class] = [ - 'extension' => 'ep_products', - 'title' => 'EP Kontingent Import', - 'description' => 'Importiert Kontingentdaten aus busProNet', -]; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\Task\ImportContingentsTask::class] = [ + 'extension' => 'ep_products', + 'title' => 'EP Kontingent Import', + 'description' => 'Importiert Kontingentdaten aus busProNet', + ]; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\Task\ImportSnowreportTask::class] = [ - 'extension' => 'ep_products', - 'title' => 'EP Schneehöhen Import', - 'description' => 'Importiert Schneehöhen', -]; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\Task\ImportSnowreportTask::class] = [ + 'extension' => 'ep_products', + 'title' => 'EP Schneehöhen Import', + 'description' => 'Importiert Schneehöhen', + ]; -$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Service']['GroupsSwissService']['writerConfiguration'] = [ - \TYPO3\CMS\Core\Log\LogLevel::INFO => [ - 'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [ - 'logFile' => \TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/groups.swiss.log', + $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Service']['GroupsSwissService']['writerConfiguration'] = [ + \TYPO3\CMS\Core\Log\LogLevel::INFO => [ + 'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [ + 'logFile' => \TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/groups.swiss.log', + ], ], - ], -]; + ]; -$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); -$iconRegistry->registerIcon( - 'ep-logo', - \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, - ['source' => 'EXT:ep_products/Resources/Public/Icons/logo.svg'] -); + $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); + $iconRegistry->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', - 'searchbar', - [ - 'Searchbar' => 'index', - ], - [ - 'Searchbar' => 'index', - ] -); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'searchbar', + [ + 'Searchbar' => 'index', + ] + ); -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'searchresult', - [ - 'Search' => 'searchresult,processSearch', - ], - [ - 'Search' => 'searchresult,processSearch', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'staticresult', - [ - 'Search' => 'staticresult', - ], - [ - 'Search' => 'staticresult', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'product_detail', - [ - 'Product' => 'detail,hotelList', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'booking_link', - [ - 'Product' => 'detail,hotelList', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'product_teasergroup', - [ - 'Product' => 'teasergroup', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'product_pricetable', - [ - 'Product' => 'pricetable', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'country_detail', - [ - 'Country' => 'detail', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'region_teasergroup', - [ - 'Region' => 'teasergroup', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'region_detail', - [ - 'Region' => 'detail', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'city_teasergroup', - [ - 'City' => 'teasergroup', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'city_detail', - [ - 'City' => 'detail', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'hotel_teasergroup', - [ - 'Hotel' => 'teasergroup', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'hotel_teasergroup_nodate', - [ - 'Hotel' => 'dateIndependentTeasergroup', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'hotel_detail', - [ - 'Hotel' => 'detail', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'hotel_groups_price', - [ - 'GroupsPrice' => 'index', - ], - [ - 'GroupsPrice' => 'index', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'hotel_detail_event', - [ - 'Hotel' => 'detailEvent', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'faq', - [ - 'Faq' => 'detail', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'concept_teasergroup', - [ - 'Concept' => 'teasergroup', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'concept_detail', - [ - 'Concept' => 'detail', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'snowreport_list', - [ - 'Snowreport' => 'list', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'teammembers', - [ - 'Team' => 'list, show', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'newsletter', - [ - 'Newsletter' => 'index', - ], - [ - 'Newsletter' => 'index', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'maps', - [ - 'Map' => 'general', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'pricetable', - [ - 'Pricetable' => 'event', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'reseller', - [ - 'Reseller' => 'list,copypaste', - ], - [ - 'Reseller' => 'list,copypaste', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'watchlist', - [ - 'Watchlist' => 'list', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'password', - [ - 'Password' => 'index', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'ajax', - [ - 'AjaxSearch' => 'searchresult', - 'AjaxFilterPanel' => 'index', - 'AjaxDate' => 'dates', - 'AjaxContingent' => 'list,rooms', - 'AjaxTable' => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', - 'AjaxCalendar' => 'range,contingents,availableRooms', - 'AjaxWatchlist' => 'list', - 'AjaxGroupsPrice' => 'processForm', - ], - [ - 'AjaxSearch' => 'searchresult', - 'AjaxFilterPanel' => 'index', - 'AjaxDate' => 'dates', - 'AjaxContingent' => 'list,rooms', - 'AjaxTable' => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', - 'AjaxCalendar' => 'range,contingents,availableRooms', - 'AjaxWatchlist' => 'list', - 'AjaxGroupsPrice' => 'processForm', - ] -); - -\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'ical', - [ - 'Ical' => 'contingents', - ], - [ - 'Ical' => 'contingents', - ] -); - -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['ep_products'] = - \EP\EpProducts\Hook\PageLayoutView::class; - -$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'gclid'; -$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'ref'; -$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'pa'; -$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[months]'; -$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[month]'; -$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[year]'; - -$GLOBALS['TYPO3_CONF_VARS']['SYS']['routing']['aspects']['PassthroughMapper'] = - \EP\EpProducts\Routing\Aspect\PassthroughMapper::class; - -$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [ - \TYPO3\CMS\Core\Log\LogLevel::INFO => [ - TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [ - 'logTable' => 'tx_epproducts_log' + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'searchresult', + [ + 'Search' => 'searchresult,processSearch', ], - ], -]; + [ + 'Search' => 'searchresult,processSearch', + ] + ); -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['teamSlug'] = - \EP\EpProducts\Updates\TeamSlugUpdater::class; + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'staticresult', + [ + 'Search' => 'staticresult', + ], + [ + 'Search' => 'staticresult', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'product_detail', + [ + 'Product' => 'detail,hotelList', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'booking_link', + [ + 'Product' => 'detail,hotelList', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'product_teasergroup', + [ + 'Product' => 'teasergroup', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'product_pricetable', + [ + 'Product' => 'pricetable', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'country_detail', + [ + 'Country' => 'detail', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'region_teasergroup', + [ + 'Region' => 'teasergroup', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'region_detail', + [ + 'Region' => 'detail', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'city_teasergroup', + [ + 'City' => 'teasergroup', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'city_detail', + [ + 'City' => 'detail', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'hotel_teasergroup', + [ + 'Hotel' => 'teasergroup', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'hotel_teasergroup_nodate', + [ + 'Hotel' => 'dateIndependentTeasergroup', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'hotel_detail', + [ + 'Hotel' => 'detail', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'hotel_groups_price', + [ + 'GroupsPrice' => 'index', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'hotel_detail_event', + [ + 'Hotel' => 'detailEvent', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'faq', + [ + 'Faq' => 'detail', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'concept_teasergroup', + [ + 'Concept' => 'teasergroup', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'concept_detail', + [ + 'Concept' => 'detail', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'snowreport_list', + [ + 'Snowreport' => 'list', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'teammembers', + [ + 'Team' => 'list, show', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'newsletter', + [ + 'Newsletter' => 'index', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'maps', + [ + 'Map' => 'general', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'pricetable', + [ + 'Pricetable' => 'event', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'reseller', + [ + 'Reseller' => 'list,copypaste', + ], + [ + 'Reseller' => 'list,copypaste', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'watchlist', + [ + 'Watchlist' => 'list', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'password', + [ + 'Password' => 'index', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'ajax', + [ + 'AjaxSearch' => 'searchresult', + 'AjaxFilterPanel' => 'index', + 'AjaxDate' => 'dates', + 'AjaxContingent' => 'list,rooms', + 'AjaxTable' => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', + 'AjaxCalendar' => 'range,contingents,availableRooms', + 'AjaxWatchlist' => 'list', + 'AjaxGroupsPrice' => 'processForm', + ], + [ + 'AjaxSearch' => 'searchresult', + 'AjaxFilterPanel' => 'index', + 'AjaxDate' => 'dates', + 'AjaxContingent' => 'list,rooms', + 'AjaxTable' => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', + 'AjaxCalendar' => 'range,contingents,availableRooms', + 'AjaxWatchlist' => 'list', + 'AjaxGroupsPrice' => 'processForm', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'EP.ep_products', + 'ical', + [ + 'Ical' => 'contingents', + ], + [ + 'Ical' => 'contingents', + ] + ); + + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['ep_products'] = + \EP\EpProducts\Hooks\PageLayoutView::class; + + $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'gclid'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'ref'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'pa'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[months]'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[month]'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[year]'; + + $GLOBALS['TYPO3_CONF_VARS']['SYS']['routing']['aspects']['PassthroughMapper'] = + \EP\EpProducts\Routing\Aspect\PassthroughMapper::class; + + $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [ + \TYPO3\CMS\Core\Log\LogLevel::INFO => [ + TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [ + 'logTable' => 'tx_epproducts_log' + ], + ], + ]; + + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['teamSlug'] = + \EP\EpProducts\Updates\TeamSlugUpdater::class; +}; + +$boot(); +unset($boot); diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCountry.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCountry.html index 683db3b5..21cff5ca 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCountry.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCountry.html @@ -1,17 +1,16 @@ + xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
- {country.name} + + +
diff --git a/public/typo3conf/ext/ep_theme/ext_localconf.php b/public/typo3conf/ext/ep_theme/ext_localconf.php index e5f5b557..9a969c66 100644 --- a/public/typo3conf/ext/ep_theme/ext_localconf.php +++ b/public/typo3conf/ext/ep_theme/ext_localconf.php @@ -1,56 +1,60 @@ [ - 'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [ - 'logFile' => \TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/bpn-api.log', + $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpTheme']['Service']['BookingApiService']['writerConfiguration'] = [ + \TYPO3\CMS\Core\Log\LogLevel::INFO => [ + 'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [ + 'logFile' => \TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/bpn-api.log', + ], ], - ], -]; + ]; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['ep_theme'] = - \EP\EpTheme\Hook\Tcemain::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['ep_theme'] = + \EP\EpTheme\Hooks\Tcemain::class; -$layout = 'cms/layout/class.tx_cms_layout.php'; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_country'] = - \EP\EpTheme\Hooks\PageLayoutView\TeaserCountryPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_region'] = - \EP\EpTheme\Hooks\PageLayoutView\TeaserRegionPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_city'] = - \EP\EpTheme\Hooks\PageLayoutView\TeaserCityPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_hotel'] = - \EP\EpTheme\Hooks\PageLayoutView\TeaserHotelPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_concept'] = - \EP\EpTheme\Hooks\PageLayoutView\TeaserConceptPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_product'] = - \EP\EpTheme\Hooks\PageLayoutView\TeaserProductPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_booking_link'] = - \EP\EpTheme\Hooks\PageLayoutView\TeaserBookingLinkPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['gmap'] = - \EP\EpTheme\Hooks\PageLayoutView\GmapPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['disturber'] = - \EP\EpTheme\Hooks\PageLayoutView\DisturberPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['disrupter'] = - \EP\EpTheme\Hooks\PageLayoutView\DisrupterPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['lineup'] = - \EP\EpTheme\Hooks\PageLayoutView\LineupPreviewRenderer::class; + $layout = 'cms/layout/class.tx_cms_layout.php'; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_country'] = + \EP\EpTheme\Hooks\PageLayoutView\TeaserCountryPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_region'] = + \EP\EpTheme\Hooks\PageLayoutView\TeaserRegionPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_city'] = + \EP\EpTheme\Hooks\PageLayoutView\TeaserCityPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_hotel'] = + \EP\EpTheme\Hooks\PageLayoutView\TeaserHotelPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_concept'] = + \EP\EpTheme\Hooks\PageLayoutView\TeaserConceptPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_product'] = + \EP\EpTheme\Hooks\PageLayoutView\TeaserProductPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_booking_link'] = + \EP\EpTheme\Hooks\PageLayoutView\TeaserBookingLinkPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['gmap'] = + \EP\EpTheme\Hooks\PageLayoutView\GmapPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['disturber'] = + \EP\EpTheme\Hooks\PageLayoutView\DisturberPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['disrupter'] = + \EP\EpTheme\Hooks\PageLayoutView\DisrupterPreviewRenderer::class; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['lineup'] = + \EP\EpTheme\Hooks\PageLayoutView\LineupPreviewRenderer::class; -$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] = 'tx_eptheme_slides'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] = 'tx_eptheme_slides'; -$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:ep_theme/Configuration/RTE/Default.yaml'; -$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['ep-reisen'] = 'EXT:ep_theme/Configuration/RTE/Default.yaml'; + $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:ep_theme/Configuration/RTE/Default.yaml'; + $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['ep-reisen'] = 'EXT:ep_theme/Configuration/RTE/Default.yaml'; -$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['ep'] = ['EP\\EpTheme\\ViewHelpers']; -$GLOBALS['TYPO3_CONF_VARS']['MAIL']['layoutRootPaths'][700] = 'EXT:ep_theme/Resources/Private/Layouts/Email/'; -$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][700] = 'EXT:ep_theme/Resources/Private/Templates/Email/'; + $GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['ep'] = ['EP\\EpTheme\\ViewHelpers']; + $GLOBALS['TYPO3_CONF_VARS']['MAIL']['layoutRootPaths'][700] = 'EXT:ep_theme/Resources/Private/Layouts/Email/'; + $GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][700] = 'EXT:ep_theme/Resources/Private/Templates/Email/'; -$metaTagManagerRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::class); -$metaTagManagerRegistry->registerManager( - 'ep_opengraph', - \EP\EpTheme\MetaTag\OpenGraphMetaTagManager::class -); + $metaTagManagerRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::class); + $metaTagManagerRegistry->registerManager( + 'ep_opengraph', + \EP\EpTheme\MetaTag\OpenGraphMetaTagManager::class + ); +}; + +$boot(); +unset($boot);