diff --git a/packages/ep_products/Classes/BpnConnect/ApiClient.php b/packages/ep_products/Classes/BpnConnect/ApiClient.php deleted file mode 100644 index 68fc1b8..0000000 --- a/packages/ep_products/Classes/BpnConnect/ApiClient.php +++ /dev/null @@ -1,140 +0,0 @@ - $hotelCode, - 'dateFrom' => $dateFrom->format('Y-m-d'), - 'mode' => $mode, - ]; - - if (null !== $dateTo) { - $query['dateTo'] = $dateTo->format('Y-m-d'); - } - - $response = $this->request('GET', 'api/v1/contingents/calendar', [ - 'query' => $query, - ]); - - $this->assertStatusCode($response, [Response::HTTP_OK], 'GET', 'api/v1/contingents/calendar'); - - return $this->decodeResponse($response, 'GET', 'api/v1/contingents/calendar'); - } - - private function request(string $method, string $uri, array $options = []): ResponseInterface - { - try { - return $this->getHttpClient()->request($method, $uri, $options); - } catch (TransportExceptionInterface $e) { - throw new ApiException(sprintf('Bpn Connect API transport error for %s %s: %s', $method, $uri, $e->getMessage()), 0, $e); - } - } - - private function assertStatusCode(ResponseInterface $response, array $expectedStatusCodes, string $method, string $uri): void - { - try { - $statusCode = $response->getStatusCode(); - } catch (TransportExceptionInterface $e) { - throw new ApiException(sprintf('Bpn Connect API transport error while reading status for %s %s: %s', $method, $uri, $e->getMessage()), 0, $e); - } - - if (in_array($statusCode, $expectedStatusCodes, true)) { - return; - } - - throw new ApiException(sprintf('Bpn Connect API returned unexpected status %d for %s %s', $statusCode, $method, $uri), $statusCode); - } - - private function decodeResponse(ResponseInterface $response, string $method, string $uri): array - { - try { - $data = $response->toArray(false); - } catch (DecodingExceptionInterface $e) { - throw new ApiException(sprintf('Bpn Connect API returned invalid JSON for %s %s: %s', $method, $uri, $e->getMessage()), 0, $e); - } catch (TransportExceptionInterface $e) { - throw new ApiException(sprintf('Bpn Connect API transport error while reading body for %s %s: %s', $method, $uri, $e->getMessage()), 0, $e); - } - - if (!isset($data['data']) || !is_array($data['data'])) { - throw new ApiException(sprintf('Bpn Connect API returned a calendar payload without a data array for %s %s', $method, $uri)); - } - - return $data; - } - - private function getHttpClient(): HttpClientInterface - { - $config = $this->getConfiguration(); - $baseUrl = trim((string)($config['bpnConnectApiBaseUrl'] ?? '')); - $apiKey = trim((string)($config['bpnConnectApiKey'] ?? '')); - - if ($baseUrl === '') { - throw new ApiException('Bpn Connect API base URL is not configured.'); - } - if ($apiKey === '') { - throw new ApiException('Bpn Connect API key is not configured.'); - } - - $options = [ - 'headers' => [ - 'X-API-KEY' => $apiKey, - ], - ]; - - // Without these the client falls back to PHP's default_socket_timeout (commonly 60s), - // so a stalled API pins a PHP worker for a minute per request. The defaults live in - // code rather than in ext_conf_template.txt: ExtensionConfiguration::get() returns the - // stored configuration verbatim and only syncs the template when an extension has no - // configuration at all, so a newly added template key is absent until someone saves - // extension configuration by hand. Falling back to 0 there would silently mean "no - // timeout" - the opposite of what this guard is for. An explicit 0 still disables. - $timeout = (int)($config['bpnConnectApiTimeout'] ?? self::DEFAULT_TIMEOUT); - if ($timeout > 0) { - $options['timeout'] = $timeout; - } - $maxDuration = (int)($config['bpnConnectApiMaxDuration'] ?? self::DEFAULT_MAX_DURATION); - if ($maxDuration > 0) { - $options['max_duration'] = $maxDuration; - } - - return HttpClient::createForBaseUri(rtrim($baseUrl, '/') . '/', $options); - } - - private function getConfiguration(): array - { - if (null === $this->configuration) { - $this->configuration = GeneralUtility::makeInstance(ExtensionConfiguration::class) - ->get('ep_products'); - } - - return $this->configuration; - } -} diff --git a/packages/ep_products/Classes/BpnConnect/ApiException.php b/packages/ep_products/Classes/BpnConnect/ApiException.php deleted file mode 100644 index 8676702..0000000 --- a/packages/ep_products/Classes/BpnConnect/ApiException.php +++ /dev/null @@ -1,7 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\ContingentImportService; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; - -class ContingentCommand extends Command -{ - - /** - * @var ContingentImportService - */ - protected $contingentImportService; - - /** - * @var string - */ - protected static $defaultName = 'ep:contingent-import'; - - /** - * @param ContingentImportService $contingentImportService - */ - public function __construct() - { - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $this->contingentImportService = $objectManager->get(ContingentImportService::class); - - parent::__construct(); - } - - /** - * @param InputInterface $input - * @param OutputInterface $output - * @throws \Doctrine\DBAL\DBALException - */ - public function execute(InputInterface $input, OutputInterface $output) - { - $count = $this->contingentImportService->import(); - $output->writeln(sprintf('%d rows imported.', $count )); - - return 0; - } - -} diff --git a/packages/ep_products/Classes/Command/DateCommandController.php b/packages/ep_products/Classes/Command/DateCommandController.php index a530858..8c352b7 100644 --- a/packages/ep_products/Classes/Command/DateCommandController.php +++ b/packages/ep_products/Classes/Command/DateCommandController.php @@ -28,7 +28,7 @@ namespace EP\EpProducts\Command; ***************************************************************/ use EP\EpProducts\Service\DateImportService; -use EP\EpProducts\Service\ProductImportSourceFactory; +use EP\EpProducts\Service\ProductImportSource; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -54,28 +54,28 @@ class DateCommandController extends Command protected $configurationManager; /** - * @var ProductImportSourceFactory + * @var ProductImportSource */ - protected $importSourceFactory; + protected $importSource; /** * @param DateImportService $importService * @param CacheService $cacheService * @param ConfigurationManagerInterface $configurationManager - * @param ProductImportSourceFactory $importSourceFactory + * @param ProductImportSource $importSource */ public function __construct ( DateImportService $importService, CacheService $cacheService, ConfigurationManagerInterface $configurationManager, - ProductImportSourceFactory $importSourceFactory + ProductImportSource $importSource ) { $this->dateImportService = $importService; $this->cacheService = $cacheService; $this->configurationManager = $configurationManager; - $this->importSourceFactory = $importSourceFactory; + $this->importSource = $importSource; parent::__construct(); } @@ -87,15 +87,14 @@ class DateCommandController extends Command */ public function execute(InputInterface $input, OutputInterface $output): int { - $importSource = $this->importSourceFactory->get(); - $import = $importSource->acquire(); + $import = $this->importSource->acquire(); if ($import === null) { $output->writeln('No new import available.'); return 0; } $count = $this->dateImportService->import($import->getRows()); - $importSource->markImported($import); + $this->importSource->markImported($import); $output->writeln(sprintf('%d rows imported.', $count )); $settings = $this->getSettings(); $resellerPageUid = $settings['resellerExportPageUid']; diff --git a/packages/ep_products/Classes/Command/ExportCommandController.php b/packages/ep_products/Classes/Command/ExportCommandController.php deleted file mode 100644 index 62c94e6..0000000 --- a/packages/ep_products/Classes/Command/ExportCommandController.php +++ /dev/null @@ -1,178 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\CsvFormatter\FacebookCatalogCsvFormatter; -use EP\EpProducts\CsvFormatter\GoogleBusinessFeedCsvFormatter; -use EP\EpProducts\Domain\Model\Reseller; -use EP\EpProducts\Domain\Repository\ResellerRepository; -use EP\EpProducts\Service\ResellerDataService; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Serializer\Encoder\XmlEncoder; -use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; -use Symfony\Component\Serializer\Serializer; -use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; - -class ExportCommandController extends Command -{ - /** - * @var array - */ - protected static $imageDimensions = [ - 'facebook' => [ - 'width' => '1080', - 'maxHeight' => '1080', - 'cropVariant' => 'facebook', - ], - 'google' => [ - 'width' => '1200', - 'maxHeight' => '1200', - 'cropVariant' => 'google', - ] - ]; - - /** - * @var ResellerRepository - */ - protected $resellerRepository; - - /** - * @var ResellerDataService - */ - protected $resellerDataService; - - public function __construct(string $name = null) - { - parent::__construct($name); - - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $this->resellerRepository = $objectManager->get(ResellerRepository::class); - $this->resellerDataService = $objectManager->get(ResellerDataService::class); - } - - /** - * @param InputInterface $input - * @param OutputInterface $output - * @throws \Doctrine\DBAL\DBALException - */ - public function execute(InputInterface $input, OutputInterface $output) - { - $resellers = $this->resellerRepository->findAll(); - $destinationFolder = sprintf( - '%s/fileadmin/reseller', - \TYPO3\CMS\Core\Core\Environment::getPublicPath() - ); - if (!file_exists($destinationFolder)) { - mkdir($destinationFolder, 0755); - } - foreach ($resellers as $reseller) { - /** @var Reseller $reseller */ - $output->writeln('Exporting XML for ' . $reseller->getName()); - $this->exportXml($reseller, $destinationFolder); - $output->writeln('Exporting CSV (Facebook) for ' . $reseller->getName()); - $this->exportCsv($reseller, 'facebook', $destinationFolder); - $output->writeln('Exporting CSV (Google) for ' . $reseller->getName()); - $this->exportCsv($reseller, 'google', $destinationFolder); - } - - return 0; - } - - /** - * @param Reseller $reseller - * @param string $destinationFolder - * @throws \Doctrine\DBAL\DBALException - */ - protected function exportXml(Reseller $reseller, $destinationFolder) - { - $myEpUrl = $this->getMyEpUrl(); - $data = $this->resellerDataService->preprocessAll($reseller, $myEpUrl); - $encoders = [new XmlEncoder('products')]; - $normalizers = [new ObjectNormalizer()]; - $serializer = new Serializer($normalizers, $encoders); - $xml = $serializer->serialize( - $data, - 'xml', - [ 'xml_encoding' => 'utf-8', 'xml_format_output' => false ] - ); - $filename = sprintf( - '%s/export_%s.xml', - $destinationFolder, - $reseller->getCode() - ); - @unlink($filename); - file_put_contents($filename, $xml); - } - - /** - * @param Reseller $reseller - * @param string $type - * @param string $destinationFolder - * @throws \Doctrine\DBAL\DBALException - */ - protected function exportCsv(Reseller $reseller, $type, $destinationFolder) - { - $myEpUrl = $this->getMyEpUrl(); - $data = $this->resellerDataService->preprocessAll( - $reseller, - $myEpUrl, - static::$imageDimensions[$type], - $type - ); - if ($type === 'google') { - $csv = GoogleBusinessFeedCsvFormatter::format($data); - } else { - $csv = FacebookCatalogCsvFormatter::format($data); - } - $filename = sprintf( - '%s/export_%s_%s.csv', - $destinationFolder, - $reseller->getCode(), - $type - ); - @unlink($filename); - $fileHandle = fopen($filename, 'wb'); - foreach ($csv as $row) { - fputcsv($fileHandle, $row); - } - fclose($fileHandle); - } - - protected function getMyEpUrl(): string - { - $config = GeneralUtility::makeInstance(ExtensionConfiguration::class) - ->get('ep_products'); - - return $config['myEpUrl'] ?? 'https://my.ep-reisen.de'; - } -} diff --git a/packages/ep_products/Classes/Command/GroupsSwissCommand.php b/packages/ep_products/Classes/Command/GroupsSwissCommand.php deleted file mode 100644 index cbe9888..0000000 --- a/packages/ep_products/Classes/Command/GroupsSwissCommand.php +++ /dev/null @@ -1,85 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\GroupsSwissService; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; - -class GroupsSwissCommand extends Command -{ - /** - * @var GroupsSwissService - */ - private $groupsSwissService; - - protected static $defaultName = 'ep:groups-swiss'; - - public function __construct() - { - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $this->groupsSwissService = $objectManager->get(GroupsSwissService::class); - - parent::__construct(); - } - - protected function configure() - { - $this->addArgument( - 'hotel', - InputArgument::REQUIRED, - 'E&P hotel uid' - ); - $this->addArgument( - 'house', - InputArgument::REQUIRED, - 'Groups.swiss house number' - ); - $this->addArgument( - 'key', - InputArgument::REQUIRED, - 'Groups.swiss API key' - ); - } - - public function execute(InputInterface $input, OutputInterface $output) - { - $hotelUid = $input->getArgument('hotel'); - $houseNumber = $input->getArgument('house'); - $apiKey = $input->getArgument('key'); - - $success = $this->groupsSwissService->publishContingents($hotelUid, $houseNumber, $apiKey); - - return $success ? 0 : 1; - } -} diff --git a/packages/ep_products/Classes/Command/SnowreportCommandController.php b/packages/ep_products/Classes/Command/SnowreportCommandController.php deleted file mode 100644 index 0efe92b..0000000 --- a/packages/ep_products/Classes/Command/SnowreportCommandController.php +++ /dev/null @@ -1,62 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\SnowreportImportService; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class SnowreportCommandController extends Command -{ - - /** - * @var SnowreportImportService - */ - protected $snowreportImportService; - - /** - * @param SnowreportImportService $snowreportImportService - */ - public function __construct(SnowreportImportService $snowreportImportService) - { - $this->snowreportImportService = $snowreportImportService; - - parent::__construct(); - } - - public function execute(InputInterface $input, OutputInterface $output) - { - $this->snowreportImportService->downloadReportsXml(); - $count = $this->snowreportImportService->importSnowReportData(); - $output->writeln(sprintf('%d rows imported.', $count )); - - return 0; - } - -} diff --git a/packages/ep_products/Classes/Controller/AjaxCalendarController.php b/packages/ep_products/Classes/Controller/AjaxCalendarController.php deleted file mode 100644 index 259b283..0000000 --- a/packages/ep_products/Classes/Controller/AjaxCalendarController.php +++ /dev/null @@ -1,391 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\BpnConnect\ApiClient as BpnConnectClient; -use EP\EpProducts\MyEP\ApiClient as MyEpClient; -use EP\EpProducts\Domain\Model\Hotel; -use EP\EpProducts\MyEP\ApiException; -use EP\EpProducts\Utility\DateUtility; -use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; - -class AjaxCalendarController extends ActionController -{ - private const CACHE_TTL = 3600; - - protected BpnConnectClient $bpnConnectClient; - protected MyEpClient $myEpClient; - protected FrontendInterface $cache; - - public function __construct(BpnConnectClient $bpnConnectClient, MyEpClient $myEpClient, FrontendInterface $cache) - { - $this->bpnConnectClient = $bpnConnectClient; - $this->myEpClient = $myEpClient; - $this->cache = $cache; - } - - public function priceCalendarAction(Hotel $hotel, int $months = 12): void - { - $hotelCode = trim($hotel->getCode() ?? ''); - $this->tagPageCacheForHotel($hotelCode); - - $dateRange = DateUtility::getDateRange(null, null, $months); - $period = $dateRange['period']; - $today = new \DateTimeImmutable('today'); - - $priceDataByDate = []; - $error = false; - $errorMessage = ''; - - if ($hotelCode !== '') { - try { - // This action is cacheable, so the rendered markup is held in the page cache - // for config.cache_period. An additional application-level cache here would - // key on exactly the same granularity (hotel + date range) and only stack a - // second TTL on top, pushing worst-case staleness past the freshness budget. - $rawData = $this->myEpClient->getPriceConfigData($hotelCode); - - $availableDates = []; - foreach ($rawData as $item) { - if (($item['status'] ?? '') === 'OK') { - $availableDates[$item['date']] = true; - } - } - - // The API no longer honours a date-range constraint, so it may return data - // further out than the default $months grid covers. Grow the grid to match - // whatever the API actually returned rather than silently dropping the tail. - $lastDataDate = null; - - foreach ($rawData as $item) { - $date = $item['date']; - $dt = \DateTimeImmutable::createFromFormat('Y-m-d', $date); - if ($dt < $today) { - continue; - } - - if (null === $lastDataDate || $dt > $lastDataDate) { - $lastDataDate = $dt; - } - - $prevDate = $dt->modify('-1 day')->format('Y-m-d'); - $isAvailable = ($item['status'] ?? '') === 'OK'; - $prevAvailable = isset($availableDates[$prevDate]); - - if ($isAvailable) { - $dayStatus = $prevAvailable ? 'ok' : 'blocked-to-ok'; - } elseif ($prevAvailable) { - $dayStatus = 'checkout-only'; - } else { - $dayStatus = 'blocked'; - } - - $priceDataByDate[$date] = [ - 'status' => $dayStatus, - 'available' => $isAvailable ? 1 : 0, - 'tooltip' => $this->buildTooltip($dayStatus, $item), - 'pricePerNight' => $item['pricePerNight'] ?? null, - 'defaultPricePerNight' => $item['defaultPricePerNight'] ?? null, - 'type' => $item['type'] ?? null, - 'currency' => $item['currency'] ?? null, - 'includedPax' => $item['includedPax'] ?? null, - 'minNights' => (int)($item['minNights'] ?? 0), - ]; - } - - if (null !== $lastDataDate) { - $dataEnd = $lastDataDate->modify('first day of next month')->setTime(0, 0, 0); - if ($dataEnd > $period->getEndDate()) { - $period = new \League\Period\Period($period->getStartDate(), $dataEnd); - } - } - } catch (ApiException $e) { - $error = true; - $errorMessage = $e->getMessage(); - $this->disablePageCache(); - } - } else { - $error = true; - $errorMessage = 'Missing hotel code'; - $this->disablePageCache(); - } - - $this->view->assignMultiple([ - 'priceDataByDate' => $priceDataByDate, - 'calendarMonths' => $this->buildCalendarMonths($period), - 'error' => $error, - 'errorMessage' => $errorMessage, - ]); - } - - public function priceConfigAction(Hotel $hotel): void - { - $hotelCode = trim($hotel->getCode() ?? ''); - $this->tagPageCacheForHotel($hotelCode); - - $priceConfig = [ - 'data' => [], - 'success' => true, - 'error' => null, - ]; - - try { - $priceConfig['data'] = $this->myEpClient->getPriceConfigData($hotelCode); - } catch (ApiException $e) { - $priceConfig['success'] = false; - $priceConfig['error'] = $e->getMessage(); - $this->disablePageCache(); - } - - $this->view->assign('priceConfig', $priceConfig); - } - - public function priceTableAction(Hotel $hotel, string $year = null): void - { - $year = $year ?? (new \DateTimeImmutable())->format('Y'); - $hotelCode = trim($hotel->getCode() ?? ''); - $this->tagPageCacheForHotel($hotelCode); - - $priceTable = [ - 'data' => [], - 'success' => true, - 'error' => null, - ]; - - try { - $priceTable['data'] = $this->myEpClient->getPriceTableData($hotelCode, $year); - } catch (ApiException $e) { - $priceTable['success'] = false; - $priceTable['error'] = $e->getMessage(); - $this->disablePageCache(); - } - - $this->view->assignMultiple([ - 'hotel' => $hotel, - 'year' => $year, - 'priceTable' => $priceTable, - ]); - } - - /** - * @param Hotel $hotel - * @param string $year - * @param string $month - * @param int $months - */ - public function rangeAction(Hotel $hotel, $year = null, $month = null, $months = 1) - { - $dateRange = DateUtility::getDateRange($year, $month, $months); - $period = $dateRange['period']; - $apiDateFrom = $dateRange['dateFrom']; - $apiDateTo = $dateRange['dateTo']; - $hotelCode = trim((string) $hotel->getCode()); - - $calendar = [ - 'meta' => [], - 'data' => [], - ]; - - if ($hotelCode === '') { - $calendar['error'] = true; - } else { - try { - $cacheIdentifier = $this->getCacheIdentifier( - $hotelCode, - $apiDateFrom, - $apiDateTo, - BpnConnectClient::CALENDAR_MODE_DAYS - ); - $cachedCalendar = $this->cache->get($cacheIdentifier); - - if (false !== $cachedCalendar) { - $calendar = $cachedCalendar; - } else { - $calendar = $this->bpnConnectClient->getCalendar( - $hotelCode, - new \DateTimeImmutable($apiDateFrom), - new \DateTimeImmutable($apiDateTo), - BpnConnectClient::CALENDAR_MODE_DAYS - ); - $this->cache->set($cacheIdentifier, $calendar, [], self::CACHE_TTL); - } - } catch (\Throwable $e) { - $calendar['error'] = true; - } - } - - $this->view->assignMultiple([ - 'months' => $months, - 'hotel' => $hotel, - 'calendar' => $calendar, - 'calendarMonths' => $this->buildCalendarMonths($period), - ]); - } - - /** - * Tag this page-cache entry with the hotel it renders, so the entry can be flushed for - * that hotel alone rather than by clearing the whole page cache and re-warming every - * calendar. Tags are stored alongside the entry by - * TypoScriptFrontendController::setPageCacheContent(). - * - * Used manually today, when one hotel's availability needs re-fetching before its hour - * is up: - * - * typo3cms cache:flushtags ep_hotel_ --groups pages - */ - private function tagPageCacheForHotel(string $hotelCode): void - { - if ('' === $hotelCode) { - return; - } - - if (isset($GLOBALS['TSFE']) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController) { - $GLOBALS['TSFE']->addCacheTags(['ep_hotel_' . $hotelCode]); - } - } - - /** - * The calendar actions are cacheable, so an API failure would otherwise pin the error - * markup in the page cache for the full cache_period. Drop caching for this request so - * the next visitor gets a fresh attempt instead of an hour-old error message. - * - * The second argument must be true: set_no_cache() ignores the call otherwise, because - * $TYPO3_CONF_VARS['FE']['disableNoCacheParameter'] defaults to true. - */ - private function disablePageCache(): void - { - if (isset($GLOBALS['TSFE']) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController) { - $GLOBALS['TSFE']->set_no_cache('Price calendar data could not be retrieved', true); - } - } - - private function buildTooltip(string $status, array $item): string - { - if ($status === 'blocked') { - return 'Nicht verfügbar'; - } - if ($status === 'checkout-only') { - return 'Nur Abreise'; - } - return $this->buildPriceTooltip($item); - } - - private function buildPriceTooltip(array $item): string - { - $price = $item['pricePerNight'] ?? null; - $currency = $this->getCurrencySymbol($item['currency'] ?? null); - - if ($price !== null) { - $priceStr = (($item['type'] ?? null) === 'discount') - ? $price . ' ' . $currency - : 'ab ' . $price . ' ' . $currency; - } else { - $priceStr = 'Anfrage'; - } - - $minNights = (int)($item['minNights'] ?? 0); - - return $minNights > 1 - ? $priceStr . ' · min. ' . $minNights . ' Nächte' - : $priceStr; - } - - private function getCurrencySymbol(?string $currency): string - { - if (null === $currency || '' === $currency) { - return '€'; - } - - return 'EUR' === $currency ? '€' : $currency; - } - - /** - * @return array> - */ - private function buildCalendarMonths(\League\Period\Period $period): array - { - $months = []; - $current = new \DateTimeImmutable($period->getStartDate()->format('Y-m-01 00:00:00')); - $lastDay = $period->getEndDate()->sub(new \DateInterval('P1D')); - $lastMonthStart = new \DateTimeImmutable($lastDay->format('Y-m-01 00:00:00')); - - while ($current <= $lastMonthStart) { - $months[] = $this->buildCalendarMonth($current); - $current = $current->modify('first day of next month'); - } - - return $months; - } - - /** - * @return array - */ - private function buildCalendarMonth(\DateTimeImmutable $monthStart): array - { - $firstOfMonth = $monthStart->setTime(0, 0, 0); - $lastOfMonth = $firstOfMonth->modify('last day of this month'); - $gridStart = $firstOfMonth->modify('monday this week'); - $gridEnd = $lastOfMonth->modify('sunday this week'); - - $weeks = []; - $week = []; - $current = $gridStart; - - while ($current <= $gridEnd) { - $week[] = [ - 'date' => $current, - 'inMonth' => $current->format('Y-m') === $firstOfMonth->format('Y-m'), - ]; - - if (count($week) === 7) { - $weeks[] = $week; - $week = []; - } - - $current = $current->add(new \DateInterval('P1D')); - } - - return [ - 'date' => $firstOfMonth, - 'weeks' => $weeks, - ]; - } - - private function getCacheIdentifier(string $hotelCode, string $dateFrom, string $dateTo, string $mode): string - { - return 'bpn_connect_calendar_' . sha1(implode('|', [ - $hotelCode, - $dateFrom, - $dateTo, - $mode, - ])); - } - -} diff --git a/packages/ep_products/Classes/Controller/AjaxContingentController.php b/packages/ep_products/Classes/Controller/AjaxContingentController.php deleted file mode 100644 index 265ed1d..0000000 --- a/packages/ep_products/Classes/Controller/AjaxContingentController.php +++ /dev/null @@ -1,102 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Hotel; -use EP\EpProducts\Domain\Model\Product; -use EP\EpProducts\Domain\Repository\ContingentRepository; -use EP\EpProducts\Service\ContingentDataService; -use EP\EpProducts\Service\MyEpUrlResolverService; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class AjaxContingentController extends ActionController -{ - /** - * @var \EP\EpProducts\Domain\Repository\ContingentRepository - */ - protected $contingentRepository; - /** - * @var ContingentDataService - */ - protected $contingentDataService; - - /** - * @var MyEpUrlResolverService - */ - protected $myEpUrlResolverService; - - /** - * @param ContingentRepository $contingentRepository - * @param ContingentDataService $contingentDataService - * @param MyEpUrlResolverService $myEpUrlResolverService - */ - public function __construct( - ContingentRepository $contingentRepository, - ContingentDataService $contingentDataService, - MyEpUrlResolverService $myEpUrlResolverService - ) { - $this->contingentRepository = $contingentRepository; - $this->contingentDataService = $contingentDataService; - $this->myEpUrlResolverService = $myEpUrlResolverService; - } - - public function initializeAction() - { - if ($this->request->hasArgument('dateFrom')) { - $dateFrom = new \DateTime($this->request->getArgument('dateFrom')); - $this->request->setArgument('dateFrom', $dateFrom); - } - if ($this->request->hasArgument('dateTo')) { - $dateTo = new \DateTime($this->request->getArgument('dateTo')); - $this->request->setArgument('dateTo', $dateTo); - } - } - - /** - * @param Hotel $hotel - * @param Product $product - * @param \DateTime $dateFrom - * @param \DateTime $dateTo - * @return string - * @throws \Doctrine\DBAL\DBALException - */ - public function roomsAction(Hotel $hotel, Product $product, \DateTime $dateFrom, \DateTime $dateTo) - { - $myEpUrl = $this->myEpUrlResolverService->resolve(); - $rooms = $this->contingentDataService->getAvailableRooms( - $dateFrom->format('Y-m-d'), - $dateTo->format('Y-m-d'), - $hotel, - $product, - $myEpUrl - ); - - return \json_encode($rooms); - } - -} diff --git a/packages/ep_products/Classes/Controller/AjaxDateController.php b/packages/ep_products/Classes/Controller/AjaxDateController.php deleted file mode 100644 index 54f215a..0000000 --- a/packages/ep_products/Classes/Controller/AjaxDateController.php +++ /dev/null @@ -1,148 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Hotel; -use EP\EpProducts\Domain\Model\Product; -use EP\EpProducts\Domain\Repository\ProductRepository; -use EP\EpProducts\Service\DateService; -use EP\EpProducts\Service\FilterService; -use EP\EpProducts\Service\ResellerDataService; -use EP\EpProducts\Traits\RequestArgumentTypeConversionTrait; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; -use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; - -class AjaxDateController extends ActionController -{ - - use RequestArgumentTypeConversionTrait; - - /** - * @var \EP\EpProducts\Service\FilterService - */ - protected $filterService; - - /** - * @var DateService - */ - protected $dateService; - - /** - * @var ResellerDataService - */ - protected $resellerDataService; - - /** - * @var ProductRepository - */ - protected $productRepository; - - /** - * @param FilterService $filterService - * @param DateService $dateService - * @param ResellerDataService $resellerDataService - * @param ProductRepository $productRepository - */ - public function __construct - ( - FilterService $filterService, - DateService $dateService, - ResellerDataService $resellerDataService, - ProductRepository $productRepository - ) - { - $this->filterService = $filterService; - $this->dateService = $dateService; - $this->resellerDataService = $resellerDataService; - $this->productRepository = $productRepository; - } - - public function initializeDatesAction() - { - if ($this->request->hasArgument('dateFrom')) { - $dateFrom = $this->request->getArgument('dateFrom'); - $this->request->setArgument('dateFrom', $dateFrom === '' ? null : $dateFrom); - } - if ($this->request->hasArgument('dateTo')) { - $dateTo = $this->request->getArgument('dateTo'); - $this->request->setArgument('dateTo', $dateTo === '' ? null : $dateTo); - } - } - - /** - * @param Product $product - * @param Hotel $hotel - * @param string $paCode - * @param string $dateFrom - * @param string $dateTo - * - * @return string - * @throws \Doctrine\DBAL\DBALException - */ - public function datesAction(Product $product, Hotel $hotel = null, $paCode = null, $dateFrom = null, $dateTo = null) - { - $forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true); - $filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids); - $filterSettings['dateFrom'] = $dateFrom; - $filterSettings['dateTo'] = $dateTo; - - $altProductLink = null; - $altLabel = null; - if ($product->getAltProduct()) { - $altProduct = $product->getAltProduct(); - if ($this->productRepository->hasDates($altProduct)) { - /** @var ContentObjectRenderer $contentObject */ - $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class); - $altProductLink = $contentObject->typoLink_URL( - [ - 'parameter' => $altProduct->getDetailPage(), - ] - ); - $altLabel = $product->getAltLabel(); - } - } - $datesTable = $this->dateService->getDatesTable([ - 'product' => $product, - 'hotel' => $hotel, - 'filterSettings' => $filterSettings, - ]); - $hasSurchargeOrDiscount = $this->dateService->checkSurcharcheOrDiscount($datesTable); - - return json_encode([ - 'dates' => $datesTable, - 'bookable' => $product->getBookable(), - 'hotelName' => $hotel->getName(), - 'altProductLink' => $altProductLink, - 'altLabel' => $altLabel, - 'hasSurcharge' => $hasSurchargeOrDiscount['surcharge'], - 'hasDiscount' => $hasSurchargeOrDiscount['discount'], - ], JSON_THROW_ON_ERROR); - } - -} diff --git a/packages/ep_products/Classes/Controller/AjaxFilterPanelController.php b/packages/ep_products/Classes/Controller/AjaxFilterPanelController.php deleted file mode 100644 index 840b8bb..0000000 --- a/packages/ep_products/Classes/Controller/AjaxFilterPanelController.php +++ /dev/null @@ -1,100 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\FilterService; -use EP\EpProducts\Service\SearchResultService; -use EP\EpProducts\Traits\RequestArgumentTypeConversionTrait; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class AjaxFilterPanelController extends ActionController -{ - - use RequestArgumentTypeConversionTrait; - - /** - * @var \EP\EpProducts\Service\FilterService - */ - protected $filterService; - - /** - * @var SearchResultService - */ - private $searchResultService; - - /** - * @param FilterService $filterService - */ - public function __construct(FilterService $filterService, SearchResultService $searchResultService) - { - $this->filterService = $filterService; - $this->searchResultService = $searchResultService; - } - - public function initializeAction() - { - $forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true); - $this->processFilterSettingsArgument($forcedConceptUids); - } - - /** - * @param array $filterSettings - */ - public function indexAction(array $filterSettings) - { - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids']); - - $searchResult = $this - ->searchResultService - ->getResult($filterSettings, $excludedConceptUids); - - $filterOptions = $this->filterService->collectFilterOptionsFromSearchResult($searchResult); - - $resultsUri = $this->uriBuilder - ->reset() - ->setCreateAbsoluteUri(true) - ->setTargetPageUid((int) $this->settings['defaultSearchPageUid']) - ->uriFor( - 'searchresult', - ['filterSettings' => $filterSettings], - 'Search', - 'epproducts', - 'searchresult' - ); - - $filterOptions->setResultsUri($resultsUri); - - $this->view->assignMultiple([ - 'filterSettings' => $filterSettings, - 'filterOptions' => $filterOptions, - 'stimulusController' => 'mobile-search', - ]); - } - -} diff --git a/packages/ep_products/Classes/Controller/AjaxSearchController.php b/packages/ep_products/Classes/Controller/AjaxSearchController.php deleted file mode 100644 index 9a2ec05..0000000 --- a/packages/ep_products/Classes/Controller/AjaxSearchController.php +++ /dev/null @@ -1,132 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\FilterService; -use EP\EpProducts\Service\SearchResultService; -use EP\EpProducts\Traits\RequestArgumentTypeConversionTrait; -use EP\EpProducts\Utility\DateUtility; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class AjaxSearchController extends ActionController -{ - - use RequestArgumentTypeConversionTrait; - - /** - * @var \EP\EpProducts\Service\FilterService - */ - protected $filterService; - - /** - * @var SearchResultService - */ - protected $searchResultService; - - /** - * @param FilterService $filterService - * @param SearchResultService $searchResultService - */ - public function __construct(FilterService $filterService, SearchResultService $searchResultService) - { - $this->filterService = $filterService; - $this->searchResultService = $searchResultService; - } - - public function initializeSearchresultAction() - { - $forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'], true); - $this->processFilterSettingsArgument($forcedConceptUids); - } - - /** - * @param array $filterSettings - */ - public function searchresultAction(array $filterSettings): void - { - $dateSelected = false; - $organic = true; - $forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'], true); - $excludedConceptUids = GeneralUtility::intExplode(',', $this->settings['excludedConceptUids'], true); - - if (isset($filterSettings['dateFrom']) || isset($filterSettings['dateTo'])) { - $dateSelected = true; - } - - $searchResult = $this - ->searchResultService - ->getResult($filterSettings, $excludedConceptUids); - - // No results? First retry without date constraint if any - if ((!empty($filterSettings['dateFrom']) || !empty($filterSettings['dateTo'])) && 0 === $searchResult->getTotal()) { - $filterSettings['dateFrom'] = null; - $filterSettings['dateTo'] = null; - $searchResult = $this->searchResultService->getResult($filterSettings, $excludedConceptUids); - $organic = false; - } - - // Still no results? Remove all constraints and search again with defaults - if (0 === $searchResult->getTotal()) { - $filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids); - $searchResult = $this->searchResultService->getResult($filterSettings, $excludedConceptUids); - $organic = false; - } - - $filterOptions = $this->filterService->collectFilterOptionsFromSearchResult($searchResult); - - $referringPageUri = $this - ->uriBuilder - ->reset() - ->setTargetPageUid((int)$this->settings['defaultSearchPageUid']) - ->setCreateAbsoluteUri(true) - ->uriFor( - 'searchresult', - ['filterSettings' => $filterSettings], - 'Search', - 'epproducts', - 'searchresult' - ) - ; - - $this->view->assignMultiple([ - 'filterSettings' => $filterSettings, - 'filterOptions' => $filterOptions, - 'searchResult' => $searchResult->getData(), - 'referringPageUri' => $referringPageUri, - 'stimulusController' => 'search', - 'meta' => [ - 'organic' => $organic, - 'total' => $searchResult->getTotal(), - 'dateRange' => DateUtility::formatDateRange($filterSettings['dateFrom'], $filterSettings['dateTo']), - 'dateSelected' => $dateSelected, - ], - ]); - } - -} diff --git a/packages/ep_products/Classes/Controller/AjaxWatchlistController.php b/packages/ep_products/Classes/Controller/AjaxWatchlistController.php deleted file mode 100644 index 396939a..0000000 --- a/packages/ep_products/Classes/Controller/AjaxWatchlistController.php +++ /dev/null @@ -1,104 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Repository\ProductRepository; -use EP\EpProducts\Service\FilterService; -use EP\EpProducts\Service\SearchResultService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class AjaxWatchlistController extends ActionController -{ - - /** - * @var ProductRepository - */ - protected $productRepository; - - /** - * @var SearchResultService - */ - protected $searchResultService; - - /** - * @var FilterService - */ - protected $filterService; - - /** - * @param ProductRepository $productRepository - * @param SearchResultService $searchResultService - * @param FilterService $filterService - */ - public function __construct - ( - ProductRepository $productRepository, - SearchResultService $searchResultService, - FilterService $filterService - ) - { - $this->productRepository = $productRepository; - $this->searchResultService = $searchResultService; - $this->filterService = $filterService; - } - - public function initializeAction() - { - if ($this->request->hasArgument('watchlistUids')) { - $watchlistUids = json_decode($this->request->getArgument('watchlistUids'), true, 512, JSON_THROW_ON_ERROR); - $this->request->setArgument('watchlistUids', $watchlistUids); - } - } - - /** - * @param array $watchlistUids - * @return string - * @throws \Doctrine\DBAL\DBALException - */ - public function listAction(array $watchlistUids = []) - { - $productUids = array_map(function ($uid) { - [ , $productUid ] = GeneralUtility::trimExplode(':', $uid); - return $productUid; - }, $watchlistUids); - - $hotelUids = array_map(function ($uid) { - [ $hotelUid, ] = GeneralUtility::trimExplode(':', $uid); - return $hotelUid; - }, $watchlistUids); - - $watchlistData = $this->productRepository->getWatchlist($productUids, $hotelUids); - $watchlist = $this->searchResultService->preprocess($watchlistData); - - $this->view->assignMultiple([ - 'watchlist' => $watchlist->getData(), - 'total' => $watchlist->getTotal() - ]); - } -} diff --git a/packages/ep_products/Classes/Controller/BackendController.php b/packages/ep_products/Classes/Controller/BackendController.php deleted file mode 100644 index d92a2a7..0000000 --- a/packages/ep_products/Classes/Controller/BackendController.php +++ /dev/null @@ -1,149 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\ContingentImportService; -use EP\EpProducts\Service\DateImportService; -use EP\EpProducts\Service\ImportTimestampService; -use EP\EpProducts\Service\LogService; -use EP\EpProducts\Service\SnowreportImportService; -use TYPO3\CMS\Backend\View\BackendTemplateView; -use TYPO3\CMS\Core\Messaging\AbstractMessage; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class BackendController extends ActionController -{ - /** - * @var BackendTemplateView - */ - protected $defaultViewObjectName = BackendTemplateView::class; - - /** - * @var BackendTemplateView - */ - protected $view; - - /** - * @var \EP\EpProducts\Service\DateImportService - */ - protected $dateImportService; - - /** - * @var \EP\EpProducts\Service\SnowreportImportService - */ - protected $snowreportImportService; - - /** - * @var \EP\EpProducts\Service\LogService - */ - protected $logService; - - /** - * @var ContingentImportService - */ - protected $contingentImportService; - - /** - * @param DateImportService $dateImportService - * @param ContingentImportService $contingentImportService - * @param SnowreportImportService $snowreportService - * @param LogService $logService - */ - public function __construct - ( - DateImportService $dateImportService, - ContingentImportService $contingentImportService, - SnowreportImportService $snowreportService, - LogService $logService - ) - { - $this->dateImportService = $dateImportService; - $this->contingentImportService = $contingentImportService; - $this->snowreportImportService = $snowreportService; - $this->logService = $logService; - } - - public function indexAction() - { - $timestampService = new ImportTimestampService(); - - $productDataUpdatedTimestamp = $timestampService->readImportTimestamp('fileadmin/products_import.info'); - $contingentsDataUpdatedTimestamp = $timestampService->readImportTimestamp('fileadmin/contingents_import.info'); - - $this->view->assign('productDataUpdatedTimestamp', $productDataUpdatedTimestamp); - $this->view->assign('contingentsDataUpdatedTimestamp', $contingentsDataUpdatedTimestamp); - } - - public function importSnowReportAction() - { - $this->snowreportImportService->downloadReportsXml(); - $count = $this->snowreportImportService->importSnowReportData(); - $this->addFlashMessage($count . ' Datensätze importiert', 'Import abgechlossen', AbstractMessage::OK); - $this->redirect('index'); - } - - public function dumpSearchLogEpreisenAction() - { - $csv = $this->logService->dumpSearchLogEpreisen(); - $this->dumpSearchLog($csv, 'epreisen'); - } - - public function dumpSearchLogEpeventsAction() - { - $csv = $this->logService->dumpSearchLogEpevents(); - $this->dumpSearchLog($csv, 'epevents'); - } - - /** - * @param array $csv - * @param $name - */ - private function dumpSearchLog(array $csv, $name) - { - $fileName = sprintf('searchlog_dump_%s_%s.csv', $name, date('dmY')); - - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Content-Description: File Transfer'); - header('Content-type: text/csv'); - header("Content-Disposition: attachment; filename={$fileName}"); - header('Expires: 0'); - header('Pragma: public'); - - $fh = @fopen( 'php://output', 'wb' ); - - foreach ($csv as $data) { - fputcsv($fh, $data, ';'); - } - - fclose($fh); - - exit; - } - -} diff --git a/packages/ep_products/Classes/Controller/CityController.php b/packages/ep_products/Classes/Controller/CityController.php deleted file mode 100644 index 2e3c869..0000000 --- a/packages/ep_products/Classes/Controller/CityController.php +++ /dev/null @@ -1,97 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\City; -use EP\EpProducts\Domain\Repository\CityRepository; -use EP\EpProducts\Service\ProductDataService; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class CityController extends ActionController -{ - - /** - * @var CityRepository - */ - protected $cityRepository; - - /** - * @var ProductDataService - */ - private $productDataService; - - /** - * @param CityRepository $cityRepository - * @param ProductDataService $productDataService - */ - public function __construct(CityRepository $cityRepository, ProductDataService $productDataService) - { - $this->cityRepository = $cityRepository; - $this->productDataService = $productDataService; - } - - /** - * @param City $city - */ - public function detailAction(City $city = null): void - { - if (null === $city) { - $cityUid = $this->settings['cityUid']; - $city = $this->cityRepository->findByIdentifier($cityUid); - } - - $teasers = []; - - if (null !== $city) { - $filterSettings = [ - 'cityUids' => [$cityUid] - ]; - $teasers = $this->productDataService->getTeasergroup($filterSettings); - } - - $this->view->assignMultiple([ - 'city' => $city, - 'teasers' => $teasers, - 'filterSettings' => $filterSettings, - ]); - } - - public function teasergroupAction(): void - { - $regionUid = (int)$this->settings['regionUid']; - $countryUid = (int)$this->settings['countryUid']; - $season = $this->settings['season']; - $citiesPid = (int)$this->settings['citiesStoragePid']; - - $cities = $this->cityRepository->getTeasersByCountryOrRegionAndSeason($regionUid, $countryUid, $season, $citiesPid); - $data = $this->configurationManager->getContentObject()->data; - $this->view->assign('data', $data); - $this->view->assign('teasers', $cities); - } - -} diff --git a/packages/ep_products/Classes/Controller/ConceptController.php b/packages/ep_products/Classes/Controller/ConceptController.php deleted file mode 100644 index 82a3796..0000000 --- a/packages/ep_products/Classes/Controller/ConceptController.php +++ /dev/null @@ -1,104 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Concept; -use EP\EpProducts\Domain\Repository\ConceptRepository; -use EP\EpProducts\Service\ProductDataService; -use EP\EpTheme\Domain\Repository\PageRepository; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class ConceptController extends ActionController -{ - - /** - * @var \EP\EpProducts\Domain\Repository\ConceptRepository - */ - protected $conceptRepository; - - /** - * @var \EP\EpProducts\Service\ProductDataService - */ - protected $productDataService; - - /** - * @var \EP\EpTheme\Domain\Repository\PageRepository - */ - private $pageRepository; - - /** - * @param ConceptRepository $conceptRepository - * @param ProductDataService $productDataService - * @param PageRepository $pageRepository - */ - public function __construct(ConceptRepository $conceptRepository, ProductDataService $productDataService, PageRepository $pageRepository) - { - $this->conceptRepository = $conceptRepository; - $this->productDataService = $productDataService; - $this->pageRepository = $pageRepository; - } - - /** - * @param Concept $concept - */ - public function detailAction(Concept $concept = null) - { - if ($concept === null) { - $conceptUid = $this->settings['conceptUid']; - $concept = $this->conceptRepository->findByIdentifier($conceptUid); - } - - $teaserConceptUids = GeneralUtility::trimExplode(',', $this->settings['additionalConceptUids']); - if (null !== $concept) { - array_unshift($teaserConceptUids, $concept->getUid()); - } - - $filterSettings = ['conceptUids' => $teaserConceptUids]; - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true); - $limit = $this->settings['showMoreLink'] ? 6 : 0; - $teasers = $this->productDataService->getTeasergroup($filterSettings, $excludedConceptUids, $limit); - $pages = $this->pageRepository->findPagesByPid((int)$this->settings['conceptsPageUid']); - $data = $this->configurationManager->getContentObject()->data; - - $this->view->assignMultiple([ - 'teasers' => $teasers, - 'concept' => $concept, - 'filterSettings' => $filterSettings, - 'pages' => $pages, - 'data' => $data, - ]); - } - - public function teasergroupAction() - { - $concepts = $this->conceptRepository->findAll(); - $this->view->assign('teasers', $concepts); - } - -} diff --git a/packages/ep_products/Classes/Controller/CountryController.php b/packages/ep_products/Classes/Controller/CountryController.php deleted file mode 100644 index 89cf743..0000000 --- a/packages/ep_products/Classes/Controller/CountryController.php +++ /dev/null @@ -1,79 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Country; -use EP\EpProducts\Domain\Repository\CountryRepository; -use EP\EpProducts\Service\ProductDataService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class CountryController extends ActionController -{ - - /** - * @var \EP\EpProducts\Domain\Repository\CountryRepository - */ - protected $countryRepository; - - /** - * @var ProductDataService - */ - protected $productDataService; - - /** - * @param CountryRepository $countryRepository - * @param ProductDataService $productDataService - */ - public function __construct(CountryRepository $countryRepository, ProductDataService $productDataService) - { - $this->countryRepository = $countryRepository; - $this->productDataService = $productDataService; - } - - /** - * @param Country $country - */ - public function detailAction(Country $country = null) - { - if ($country === null) { - $countryUid = $this->settings['countryUid']; - $country = $this->countryRepository->findByIdentifier($countryUid); - } - $filterSettings = [ - 'countryUids' => [ $countryUid ], - ]; - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true); - $limit = $this->settings['showMoreLink'] ? 6 : 0; - $teasers = $this->productDataService->getTeasergroup($filterSettings, $excludedConceptUids, $limit); - $this->view->assign('teasers', $teasers); - $this->view->assign('country', $country); - $this->view->assign('filterSettings', $filterSettings); - } - -} diff --git a/packages/ep_products/Classes/Controller/FaqController.php b/packages/ep_products/Classes/Controller/FaqController.php deleted file mode 100644 index d919da1..0000000 --- a/packages/ep_products/Classes/Controller/FaqController.php +++ /dev/null @@ -1,56 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Repository\FaqRepository; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class FaqController extends ActionController -{ - - /** - * @var \EP\EpProducts\Domain\Repository\FaqRepository - */ - protected $faqRepository; - - /** - * @param FaqRepository $faqRepository - */ - public function __construct(FaqRepository $faqRepository) - { - $this->faqRepository = $faqRepository; - } - - public function detailAction() - { - $faqUids = $this->settings['faqUids']; - $faqs = $this->faqRepository->findByUids($faqUids); - $this->view->assign('faqs', $faqs); - } - -} diff --git a/packages/ep_products/Classes/Controller/HotelController.php b/packages/ep_products/Classes/Controller/HotelController.php deleted file mode 100644 index ce1d22b..0000000 --- a/packages/ep_products/Classes/Controller/HotelController.php +++ /dev/null @@ -1,152 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Hotel; -use EP\EpProducts\Domain\Repository\HotelRepository; -use EP\EpProducts\Domain\Repository\ProductRepository; -use EP\EpProducts\Service\HotelDataService; -use EP\EpProducts\Service\ProductDataService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class HotelController extends ActionController -{ - - /** - * @var \EP\EpProducts\Domain\Repository\HotelRepository - */ - protected $hotelRepository; - - /** - * @var \EP\EpProducts\Domain\Repository\ProductRepository - */ - protected $productRepository; - - /** - * @var \EP\EpProducts\Service\HotelDataService - */ - protected $hotelDataService; - - /** - * @var ProductDataService - */ - protected $productDataService; - - /** - * @param HotelDataService $hotelDataService - * @param HotelRepository $hotelRepository - * @param ProductRepository $productRepository - * @param ProductDataService $productDataService - */ - public function __construct - ( - HotelDataService $hotelDataService, - HotelRepository $hotelRepository, - ProductRepository $productRepository, - ProductDataService $productDataService - ) - { - $this->hotelRepository = $hotelRepository; - $this->productRepository = $productRepository; - $this->hotelDataService = $hotelDataService; - $this->productDataService = $productDataService; - } - - /** - * @param Hotel $hotel - */ - public function detailAction(Hotel $hotel = null) - { - if ($hotel !== null) { - $hotelUid = $hotel->getUid(); - } else { - $hotelUid = $this->settings['hotelUid']; - /** @var Hotel $hotel */ - $hotel = $this->hotelRepository->findByIdentifier($hotelUid); - } - $filterSettings = [ - 'hotelUid' => $hotelUid, - ]; - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true); - $limit = $this->settings['hideMoreLink'] ? 0 : 6; - $teasers = $this->productDataService->getTeasergroup($filterSettings, $excludedConceptUids, $limit); - $this->view->assign('hotel', $hotel); - $this->view->assign('teasers', $teasers); - $this->view->assign('filterSettings', $filterSettings); - } - - public function detailEventAction() - { - $productUid = $this->settings['productUid']; - /** @var \EP\EpProducts\Domain\Model\Product $product */ - $product = $this->productRepository->findByIdentifier($productUid); - $hotelUid = $this->settings['hotelUid']; - /** @var \EP\EpProducts\Domain\Model\Hotel $hotel */ - $hotel = $this->hotelRepository->findByIdentifier($hotelUid); - $this->view->assignMultiple([ - 'product' => $product, - 'hotel' => $hotel, - ]); - } - - public function teasergroupAction() - { - $criteria = [ - 'regionUid' => (int) $this->settings['regionUid'], - 'countryUid' => (int) $this->settings['countryUid'], - 'conceptUid' => (int) $this->settings['conceptUid'], - 'productUid' => (int) $this->settings['productUid'], - 'category' => (int) $this->settings['category'], - 'type' => (int) $this->settings['type'], - ]; - $bookable = $this->hotelDataService->getTeasersByCriteria($criteria); - $bookableHotelUids = array_keys($bookable); - $nonBookable = $this->hotelDataService->getDateIndependentTeasersByCriteria($criteria, $bookableHotelUids); - $data = $this->configurationManager->getContentObject()->data; - $this->view->assign('data', $data); - $this->view->assign('bookable', $bookable); - $this->view->assign('nonBookable', $nonBookable); - } - - public function dateIndependentTeasergroupAction() - { - $criteria = [ - 'regionUid' => (int) $this->settings['regionUid'], - 'countryUid' => (int) $this->settings['countryUid'], - 'productUid' => (int) $this->settings['productUid'], - 'category' => (int) $this->settings['category'], - 'type' => (int) $this->settings['type'], - ]; - $hotels = $this->hotelDataService->getDateIndependentTeasersByCriteria($criteria); - $data = $this->configurationManager->getContentObject()->data; - $this->view->assign('data', $data); - $this->view->assign('teasers', $hotels); - } - -} diff --git a/packages/ep_products/Classes/Controller/IcalController.php b/packages/ep_products/Classes/Controller/IcalController.php deleted file mode 100644 index 46675b0..0000000 --- a/packages/ep_products/Classes/Controller/IcalController.php +++ /dev/null @@ -1,56 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Hotel; -use EP\EpProducts\Service\IcalService; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class IcalController extends ActionController -{ - /** - * @var IcalService - */ - protected $icalService; - - public function __construct(IcalService $icalService) - { - $this->icalService = $icalService; - } - - /** - * @param Hotel $hotel - * @return string - */ - public function contingentsAction(Hotel $hotel) - { - header(sprintf('Content-disposition: attachment; filename=%s.ical', $hotel->getPathSegment())); - - return $this->icalService->createContingentsFeed($hotel); - } -} diff --git a/packages/ep_products/Classes/Controller/MapController.php b/packages/ep_products/Classes/Controller/MapController.php deleted file mode 100644 index 612f6f7..0000000 --- a/packages/ep_products/Classes/Controller/MapController.php +++ /dev/null @@ -1,123 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Repository\HotelRepository; -use EP\EpProducts\Domain\Repository\ProductRepository; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; -use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; - -class MapController extends ActionController -{ - - /** - * @var \EP\EpProducts\Domain\Repository\HotelRepository - */ - protected $hotelRepository; - - /** - * @var \EP\EpProducts\Domain\Repository\ProductRepository - */ - protected $productRepository; - - /** - * @param HotelRepository $hotelRepository - * @param ProductRepository $productRepository - */ - public function __construct( - HotelRepository $hotelRepository, - ProductRepository $productRepository - ) - { - $this->hotelRepository = $hotelRepository; - $this->productRepository = $productRepository; - } - - public function generalAction() - { - $markerData = []; - $selectedHotels = $this->settings['hotelUids']; - $hotelUids = GeneralUtility::trimExplode(',', $selectedHotels); - $hotels = $this->hotelRepository->getListByUids($hotelUids); - if ($hotels) { - foreach ($hotels as $hotel) - { - /** @var \EP\EpProducts\Domain\Model\Hotel $hotel */ - $markerData[] = [ - 'name' => $hotel->getName(), - 'uri' => $this->getUriForPageUid($hotel->getDetailPage()), - 'teaser' => $hotel->getTeaser(), - 'lat' => $hotel->getLatitude(), - 'lng' => $hotel->getLongitude(), - ]; - } - } - - $selectedProducts = $this->settings['productUids']; - $productUids = GeneralUtility::trimExplode(',', $selectedProducts); - $products = $this->productRepository->getListByUids($productUids); - if ($products) { - foreach ($products as $product) - { - /** @var \EP\EpProducts\Domain\Model\Product $product */ - $hotel = $product->getHotels()->current(); - if (null === $hotel || false === $hotel->isShowAsTeaser()) { - continue; - } - $markerData[] = [ - 'name' => $product->getName(), - 'uri' => $this->getUriForPageUid($product->getDetailPage()), - 'externalLink' => $hotel->getExternalLink(), - 'teaser' => preg_replace("/[\r\n\t]/", "", $product->getTeaser()), - 'lat' => $hotel->getLatitude(), - 'lng' => $hotel->getLongitude(), - ]; - } - } - - $data = $this->configurationManager->getContentObject()->data; - $this->view->assign('data', $data); - $this->view->assign('markerData', json_encode($markerData, JSON_THROW_ON_ERROR | JSON_HEX_APOS)); - } - - /** - * @param int $pageUid - * @return string - */ - protected function getUriForPageUid($pageUid) - { - /** @var ContentObjectRenderer $contentObject */ - $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class); - return $contentObject->typoLink_URL( - [ - 'parameter' => $pageUid, - ] - ); - } -} diff --git a/packages/ep_products/Classes/Controller/NewsletterController.php b/packages/ep_products/Classes/Controller/NewsletterController.php deleted file mode 100644 index 07c4ae4..0000000 --- a/packages/ep_products/Classes/Controller/NewsletterController.php +++ /dev/null @@ -1,80 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Dto\NewsletterSubscriptionRequest; -use EP\EpProducts\MyEP\ApiClient; -use EP\EpProducts\MyEP\ApiException; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class NewsletterController extends ActionController -{ - private ApiClient $apiClient; - - public function __construct(ApiClient $apiClient) - { - $this->apiClient = $apiClient; - } - - public function indexAction() - { - $this->view->assign('result', GeneralUtility::_GET('result')); - } - - public function subscriptionFormAction(?NewsletterSubscriptionRequest $subscriptionRequest = null) - { - if (null === $subscriptionRequest) { - $subscriptionRequest = new NewsletterSubscriptionRequest(); - } - - try { - $lists = $this->apiClient->getNewsletterLists(); - } catch (ApiException $e) { - $lists = []; - } - - $this->view->assign('subscriptionRequest', $subscriptionRequest); - $this->view->assign('lists', $lists); - } - - public function subscriptionFormSubmitAction(NewsletterSubscriptionRequest $subscriptionRequest) - { - try { - $result = $this->apiClient->subscribeToNewsletters($subscriptionRequest); - $result['success'] = true; - } catch (ApiException $e) { - $result = [ - 'success' => false, - 'message' => $e->getMessage(), - ]; - } - - $this->view->assign('result', $result); - } -} diff --git a/packages/ep_products/Classes/Controller/PricetableController.php b/packages/ep_products/Classes/Controller/PricetableController.php deleted file mode 100644 index 3271299..0000000 --- a/packages/ep_products/Classes/Controller/PricetableController.php +++ /dev/null @@ -1,41 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class PricetableController extends ActionController -{ - - public function eventAction() - { - $productUid = $this->settings['productUid']; - $this->view->assign('productUid', $productUid); - } - -} diff --git a/packages/ep_products/Classes/Controller/RegionController.php b/packages/ep_products/Classes/Controller/RegionController.php deleted file mode 100644 index e605507..0000000 --- a/packages/ep_products/Classes/Controller/RegionController.php +++ /dev/null @@ -1,95 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Region; -use EP\EpProducts\Domain\Repository\RegionRepository; -use EP\EpProducts\Service\ProductDataService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class RegionController extends ActionController -{ - - /** - * @var \EP\EpProducts\Domain\Repository\RegionRepository - */ - protected $regionRepository; - - /** - * @var \EP\EpProducts\Service\ProductDataService - */ - protected $productDataService; - - /** - * @param RegionRepository $regionRepository - * @param ProductDataService $productDataService - */ - public function __construct(RegionRepository $regionRepository, ProductDataService $productDataService) - { - $this->regionRepository = $regionRepository; - $this->productDataService = $productDataService; - } - - /** - * @param Region $region - */ - public function detailAction(Region $region = null) - { - if ($region === null) { - $regionUid = $this->settings['regionUid']; - $region = $this->regionRepository->findByIdentifier($regionUid); - } - $additionalRegionUids = GeneralUtility::trimExplode(',', $this->settings['additionalRegionUids'], true); - $additionalRegionUids = array_map(function ($uid) { - return (int)$uid; - }, $additionalRegionUids); - $teaserRegionUids = array_merge([$region->getUid()], $additionalRegionUids); - $filterSettings = [ - 'regionUids' => $teaserRegionUids, - ]; - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true); - $limit = $this->settings['hideMoreLink'] ? 0 : 6; - $teasers = $this->productDataService->getTeasergroup($filterSettings, $excludedConceptUids, $limit); - $this->view->assign('teasers', $teasers); - $this->view->assign('region', $region); - $this->view->assign('filterSettings', $filterSettings); - } - - public function teasergroupAction() - { - $countryUid = (int)$this->settings['countryUid']; - $season = $this->settings['season']; - $regionsPid = (int)$this->settings['regionsStoragePid']; - $regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season, $regionsPid); - $data = $this->configurationManager->getContentObject()->data; - $this->view->assign('data', $data); - $this->view->assign('teasers', $regions); - } - -} diff --git a/packages/ep_products/Classes/Controller/ResellerController.php b/packages/ep_products/Classes/Controller/ResellerController.php deleted file mode 100644 index 24e2f19..0000000 --- a/packages/ep_products/Classes/Controller/ResellerController.php +++ /dev/null @@ -1,99 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Product; -use EP\EpProducts\Domain\Model\Reseller; -use EP\EpProducts\Service\MyEpUrlResolverService; -use EP\EpProducts\Service\ResellerDataService; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class ResellerController extends ActionController -{ - /** - * @var ResellerDataService - */ - protected $resellerDataService; - - /** - * @var MyEpUrlResolverService - */ - protected $myEpUrlResolverService; - - /** - * @param ResellerDataService $resellerDataService - * @param MyEpUrlResolverService $myEpUrlResolverService - */ - public function __construct( - ResellerDataService $resellerDataService, - MyEpUrlResolverService $myEpUrlResolverService - ) { - $this->resellerDataService = $resellerDataService; - $this->myEpUrlResolverService = $myEpUrlResolverService; - } - - /** - * @param Reseller $reseller - */ - public function listAction(Reseller $reseller = null) - { - $products = []; - - if ($reseller !== null) { - $products = $reseller->getProducts(); - } - - $this->view->assign('reseller', $reseller); - $this->view->assign('products', $products); - } - - /** - * @param Reseller $reseller - * @param Product $product - * @throws \Doctrine\DBAL\DBALException - * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException - * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException - */ - public function copypasteAction(Reseller $reseller, Product $product) - { - if (!$reseller->getProducts()->contains($product)) { - $this->redirect( - 'list', - null, - null, - [ 'reseller' => $reseller ] - ); - } - - $myEpUrl = $this->myEpUrlResolverService->resolve(); - $productData = $this->resellerDataService->preprocessSingle($product, $reseller, $myEpUrl); - - $this->view->assign('reseller', $reseller); - $this->view->assign('productData', $productData); - } -} diff --git a/packages/ep_products/Classes/Controller/SearchController.php b/packages/ep_products/Classes/Controller/SearchController.php deleted file mode 100644 index dc3d552..0000000 --- a/packages/ep_products/Classes/Controller/SearchController.php +++ /dev/null @@ -1,168 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\FilterService; -use EP\EpProducts\Service\FilterSettingsEncoder; -use EP\EpProducts\Service\SearchResultService; -use EP\EpProducts\Traits\RequestArgumentTypeConversionTrait; -use EP\EpProducts\Utility\DateUtility; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class SearchController extends ActionController -{ - - use RequestArgumentTypeConversionTrait; - - /** - * @var \EP\EpProducts\Service\FilterService - */ - protected $filterService; - - /** - * @var SearchResultService - */ - private $searchResultService; - - /** - * @param FilterService $filterService - */ - public function __construct(FilterService $filterService, SearchResultService $searchResultService) - { - $this->filterService = $filterService; - $this->searchResultService = $searchResultService; - } - - public function initializeProcessSearchAction() - { - $this->processSearchParamsArgument(); - } - - /** - * @param array $searchParams - */ - public function processSearchAction(array $searchParams) - { - $filterSettings = $this->filterService->getFilterSettingsFromSearchParams($searchParams); - - $redirectUri = $this->uriBuilder - ->reset() - ->setCreateAbsoluteUri(true) - ->uriFor( - 'searchresult', - ['filterSettings' => $filterSettings], - null, - null, - 'searchresult' - ); - - $this->redirectToUri($redirectUri); - } - - public function initializeSearchresultAction() - { - // Process encoded filtersettings from static search result. - // Explicit filter settings win: they carry the visitor's current selection, - // whereas a stale 'f' riding along on a link would silently replace it. - $encodedFilterSettings = GeneralUtility::_GET('f'); - if ($encodedFilterSettings && !$this->request->hasArgument('filterSettings')) { - $filterSettingsEncoder = new FilterSettingsEncoder(); - $filterSettings = $filterSettingsEncoder->decode($encodedFilterSettings); - if (count($filterSettings) > 0) { - $this->request->setArgument('filterSettings', $filterSettings); - } - } - $forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'], true); - $this->processFilterSettingsArgument($forcedConceptUids); - } - - /** - * @param array $filterSettings - */ - public function searchresultAction(array $filterSettings) - { - $dateSelected = false; - $organic = true; - $forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'], true); - $excludedConceptUids = GeneralUtility::intExplode(',', $this->settings['excludedConceptUids']); - - if (!empty($filterSettings['dateFrom']) || !empty($filterSettings['dateTo'])) { - $dateSelected = true; - } - - $searchResult = $this - ->searchResultService - ->getResult($filterSettings, $excludedConceptUids); - - // No results? First retry without date constraint if any - if ((!empty($filterSettings['dateFrom']) || !empty($filterSettings['dateTo'])) && 0 === $searchResult->getTotal()) { - $filterSettings['dateFrom'] = null; - $filterSettings['dateTo'] = null; - $searchResult = $this->searchResultService->getResult($filterSettings, $excludedConceptUids); - $organic = false; - } - - // Still no results? Remove all constraints and search again with defaults - if (0 === $searchResult->getTotal()) { - $filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids); - $searchResult = $this->searchResultService->getResult($filterSettings, $excludedConceptUids); - $organic = false; - } - - $filterOptions = $this->filterService->collectFilterOptionsFromSearchResult($searchResult); - - $referringPageUri = $this - ->uriBuilder - ->reset() - ->setTargetPageUid($this->settings['defaultSearchPageUid']) - ->setCreateAbsoluteUri(true) - ->uriFor( - 'searchresult', - ['filterSettings' => $filterSettings], - 'Search', - 'epproducts', - 'searchresult' - ) - ; - - $this->view->assignMultiple([ - 'filterSettings' => $filterSettings, - 'filterOptions' => $filterOptions, - 'searchResult' => $searchResult->getData(), - 'referringPageUri' => $referringPageUri, - 'stimulusController' => 'search', - 'meta' => [ - 'organic' => $organic, - 'total' => $searchResult->getTotal(), - 'dateRange' => DateUtility::formatDateRange($filterSettings['dateFrom'], $filterSettings['dateTo']), - 'dateSelected' => $dateSelected, - ], - ]); - } -} diff --git a/packages/ep_products/Classes/Controller/SearchbarController.php b/packages/ep_products/Classes/Controller/SearchbarController.php deleted file mode 100644 index 2f9b6d1..0000000 --- a/packages/ep_products/Classes/Controller/SearchbarController.php +++ /dev/null @@ -1,87 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\FilterService; -use EP\EpProducts\Service\SearchResultService; -use EP\EpProducts\Traits\RequestArgumentTypeConversionTrait; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class SearchbarController extends ActionController -{ - - use RequestArgumentTypeConversionTrait; - - /** - * @var FilterService - */ - protected $filterService; - - /** - * @var SearchResultService - */ - protected $searchResultService; - - /** - * @param FilterService $filterService - * @param SearchResultService $searchResultService - */ - public function __construct(FilterService $filterService, SearchResultService $searchResultService) - { - $this->filterService = $filterService; - $this->searchResultService = $searchResultService; - } - - public function initializeAction() - { - $this->processSearchParamsArgument(); - } - - /** - * @param array $searchParams - */ - public function indexAction(array $searchParams) - { - $forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true); - $filterSettings = $this->filterService->getFilterSettingsFromSearchParams($searchParams, $forcedConceptUids); - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids']); - - $searchResult = $this - ->searchResultService - ->getResult($filterSettings, $excludedConceptUids); - - $filterOptions = $this->filterService->collectFilterOptionsFromSearchResult($searchResult); - - $this->view->assignMultiple([ - 'filterOptions' => $filterOptions, - 'searchParams' => $searchParams, - 'collapsed' => (bool)$this->settings['collapsed'], - ]); - } -} diff --git a/packages/ep_products/Classes/Controller/SnowreportController.php b/packages/ep_products/Classes/Controller/SnowreportController.php deleted file mode 100644 index 10d4a0c..0000000 --- a/packages/ep_products/Classes/Controller/SnowreportController.php +++ /dev/null @@ -1,59 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Repository\SnowreportRepository; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class SnowreportController extends ActionController -{ - - /** - * @var \EP\EpProducts\Domain\Repository\SnowreportRepository - */ - protected $snowreportRepository; - - /** - * @param SnowreportRepository $snowreportRepository - */ - public function __construct(SnowreportRepository $snowreportRepository) - { - $this->snowreportRepository = $snowreportRepository; - } - - public function listAction() - { - $regionUids = GeneralUtility::trimExplode(',', $this->settings['regionUids'], true); - $list = $this->snowreportRepository->getSnowreportsForRegions($regionUids); - $data = $this->configurationManager->getContentObject()->data; - $this->view->assign('data', $data); - $this->view->assign('list', $list); - } - -} diff --git a/packages/ep_products/Classes/Controller/TeamController.php b/packages/ep_products/Classes/Controller/TeamController.php deleted file mode 100644 index 0d08fc4..0000000 --- a/packages/ep_products/Classes/Controller/TeamController.php +++ /dev/null @@ -1,96 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Teammember; -use EP\EpProducts\Domain\Repository\TeammemberRepository; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class TeamController extends ActionController -{ - /** - * @var \EP\EpProducts\Domain\Repository\TeammemberRepository - */ - protected $teammemberRepository; - - /** - * @param TeammemberRepository $teammemberRepository - */ - public function __construct(TeammemberRepository $teammemberRepository) - { - $this->teammemberRepository = $teammemberRepository; - } - - public function listAction() - { - if (isset($this->settings['teamCategories']) && count(GeneralUtility::trimExplode(',', $this->settings['teamCategories'], true)) > 0) { - $members = $this->teammemberRepository->findByCategories(GeneralUtility::trimExplode(',', $this->settings['teamCategories'], true)); - } else { - $members = $this->teammemberRepository->findAll(); - } - - $this->view->assign('members', $members); - } - - /** - * @param Teammember $member - * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException - * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException - */ - public function showAction(Teammember $member = null) - { - if ($member === null) { - $this->redirect('list', null, null, null, null, 0, 302); - } - - $this->view->assign('member', $member); - $this->view->assign('data', $this->configurationManager->getContentObject()->data); - $this->view->assign('header', $this->coalesceHeader($member)); - } - - /** - * @param Teammember $member - * - * @return string - */ - public function coalesceHeader(Teammember $member) - { - $data = $this->configurationManager->getContentObject()->data; - if (isset($data['header']) && $data['header'] !== '') { - return $data['header']; - } - - $firstCategory = current($member->getCategories()->toArray()); - if ($firstCategory !== null && $firstCategory !== false) { - return $firstCategory->getTitle(); - } - - return ''; - } -} diff --git a/packages/ep_products/Classes/Controller/TravelinfoController.php b/packages/ep_products/Classes/Controller/TravelinfoController.php deleted file mode 100644 index 9e880bc..0000000 --- a/packages/ep_products/Classes/Controller/TravelinfoController.php +++ /dev/null @@ -1,105 +0,0 @@ -apiClient = $apiClient; - $this->travelinfoRepository = $travelinfoRepository; - } - - public function travelCodeAction(string $travelCode) - { - // find specific travel info by code including travel date first - $travelInfo = $this->travelinfoRepository->findOneByTravelCode($travelCode); - - // find general travel info by code without travel date as fallback - if (null === $travelInfo) { - $travelCodeBase = substr($travelCode, 0, -6); - $travelInfo = $this->travelinfoRepository->findOneByTravelCode($travelCodeBase); - } - - // return 404 in case no travel info is available as last resort - if (null === $travelInfo) { - $response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction( - $GLOBALS['TYPO3_REQUEST'], - 'Reiseinformationen nicht gefunden' - ); - throw new ImmediateResponseException($response, 1731071856); - } - - $this->handleRequest($travelCode, $travelInfo); - } - - public function travelInfoAction(Travelinfo $travelInfo) - { - $travelCode = $travelInfo->getTravelCode(); - - $this->handleRequest($travelCode, $travelInfo); - } - - private function handleRequest(string $travelCode, Travelinfo $travelInfo) - { - - // fetch travel data via API call - try { - $travelData = $this->apiClient->getTravel($travelCode); - } catch (ApiException $e) { - $travelData = []; - } - - try { - $pickupsPlanning = $this->apiClient->getPickupsPlanning($travelCode); - } catch (ApiException $e) { - $pickupsPlanning = []; - } - - // extract courses from additional services - $courses = array_filter($travelData['additionalServices'] ?? [], function ($service) { - return 'KUR' === $service['subType']; - }); - - // extract board services from included services - $includedServicesBoard = $travelData['selectionGroups'][self::SELECTION_ID_BOARD] ?? []; - $board = $includedServicesBoard['selections'] ?? []; - - // extract bus departure time if applicable - $departureDayTime = null; - $service = array_filter($travelData['transportationServices'] ?? [], function ($service) { - return 'BUS' === $service['subType'] && 'RUECK' === $service['direction']; - }); - if ($serviceDetail = reset($service)) { - $departureDayTime = $serviceDetail['dayTime']; - } - - $this->view->assign('travelInfo', $travelInfo); - $this->view->assign('travelData', $travelData); - $this->view->assign('pickupsPlanning', $pickupsPlanning); - $this->view->assign('courses', $courses); - $this->view->assign('board', $board); - $this->view->assign('departureDayTime', $departureDayTime); - } -} diff --git a/packages/ep_products/Classes/Controller/WatchlistController.php b/packages/ep_products/Classes/Controller/WatchlistController.php deleted file mode 100644 index 74f46ac..0000000 --- a/packages/ep_products/Classes/Controller/WatchlistController.php +++ /dev/null @@ -1,42 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class WatchlistController extends ActionController -{ - - public function listAction() - { - $data = $this->configurationManager->getContentObject()->data; - $this->view->assign('data', $data); - $this->view->assign('referringPageUid', $GLOBALS['TSFE']->id); - } - -} diff --git a/packages/ep_products/Classes/CsvFormatter/FacebookCatalogCsvFormatter.php b/packages/ep_products/Classes/CsvFormatter/FacebookCatalogCsvFormatter.php deleted file mode 100644 index 2b86448..0000000 --- a/packages/ep_products/Classes/CsvFormatter/FacebookCatalogCsvFormatter.php +++ /dev/null @@ -1,66 +0,0 @@ - 0 ? 'in stock' : 'out of stock', - 'new', - $description, - $product['images']['image'][0], - $product['link'], - $product['name'], - sprintf('%.2f EUR', $minPrice), - 'brand-epreisen' - ]; - } - - return $csv; - } -} diff --git a/packages/ep_products/Classes/CsvFormatter/GoogleBusinessFeedCsvFormatter.php b/packages/ep_products/Classes/CsvFormatter/GoogleBusinessFeedCsvFormatter.php deleted file mode 100644 index 9a8e17c..0000000 --- a/packages/ep_products/Classes/CsvFormatter/GoogleBusinessFeedCsvFormatter.php +++ /dev/null @@ -1,58 +0,0 @@ - 0) { - $csv[] = [ - $product['@id'], - $product['@id'], - $product['name'], - $product['link'], - $product['images']['image'][0], - sprintf('%.2f EUR', $minPrice), - ]; - } - } - - return $csv; - } -} diff --git a/packages/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php b/packages/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php deleted file mode 100644 index 0a9d3ad..0000000 --- a/packages/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php +++ /dev/null @@ -1,484 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -class GroupsPriceInquiry -{ - const MODE_INQUIRY = 'inquiry'; - const MODE_BOOKING = 'booking'; - - /** - * @var string - */ - protected $mode; - - /** - * @var bool - * @TYPO3\CMS\Extbase\Annotation\Validate("Boolean", options={"is": true}) - */ - protected $confirmation; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $name; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $group; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $street; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $postcode; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $city; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - * @TYPO3\CMS\Extbase\Annotation\Validate("EmailAddress") - */ - protected $email; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $phone; - - /** - * @var string - */ - protected $remarks; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $dateFrom; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $dateTo; - - /** - * @var string - */ - protected $nights; - - /** - * @var string - */ - protected $pax; - - /** - * @var string - */ - protected $children; - - /** - * @var string - */ - protected $minors; - - /** - * @var string - */ - protected $adolescents; - - /** - * @var array - */ - protected $options = []; - - /** - * @var GroupsPriceBoard - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $board; - - /** - * @var array - */ - protected $summary; - - public function __construct() - { - $this->mode = self::MODE_BOOKING; - } - - /** - * @return bool - */ - public function isConfirmation() - { - return $this->confirmation; - } - - /** - * @param bool $confirmation - */ - public function setConfirmation($confirmation) - { - $this->confirmation = $confirmation; - } - - /** - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * @param string $mode - */ - public function setMode($mode) - { - $this->mode = $mode; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * @param string $group - */ - public function setGroup($group) - { - $this->group = $group; - - return $this; - } - - /** - * @return string - */ - public function getStreet() - { - return $this->street; - } - - /** - * @param string $street - */ - public function setStreet($street) - { - $this->street = $street; - - return $this; - } - - /** - * @return string - */ - public function getPostcode() - { - return $this->postcode; - } - - /** - * @param string $postcode - */ - public function setPostcode($postcode) - { - $this->postcode = $postcode; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - */ - public function setCity($city) - { - $this->city = $city; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - */ - public function setEmail($email) - { - $this->email = $email; - } - - /** - * @return string - */ - public function getPhone() - { - return $this->phone; - } - - /** - * @param string $phone - */ - public function setPhone($phone) - { - $this->phone = $phone; - } - - /** - * @return string - */ - public function getRemarks() - { - return $this->remarks; - } - - /** - * @param string $remarks - */ - public function setRemarks($remarks) - { - $this->remarks = $remarks; - } - - /** - * @return string - */ - public function getDateFrom() - { - return $this->dateFrom; - } - - /** - * @param string $dateFrom - */ - public function setDateFrom($dateFrom) - { - $this->dateFrom = $dateFrom; - } - - /** - * @return string - */ - public function getDateTo() - { - return $this->dateTo; - } - - /** - * @param string $dateTo - */ - public function setDateTo($dateTo) - { - $this->dateTo = $dateTo; - } - - /** - * @return string - */ - public function getNights() - { - return $this->nights; - } - - /** - * @param string $nights - */ - public function setNights($nights) - { - $this->nights = $nights; - } - - /** - * @return string - */ - public function getPax() - { - return $this->pax; - } - - /** - * @param string $pax - */ - public function setPax($pax) - { - $this->pax = $pax; - } - - /** - * @return string - */ - public function getChildren() - { - return $this->children; - } - - /** - * @param string $pax - */ - public function setChildren($children) - { - $this->children = $children; - } - - /** - * @return string - */ - public function getMinors() - { - return $this->minors; - } - - /** - * @param string $minors - */ - public function setMinors($minors) - { - $this->minors = $minors; - } - - /** - * @return string - */ - public function getAdolescents() - { - return $this->adolescents; - } - - /** - * @param string $adolescents - */ - public function setAdolescents($adolescents) - { - $this->adolescents = $adolescents; - } - - /** - * @return int - */ - public function getEffectivePax() - { - return max(30, (int) $this->getPax() - (int) $this->getChildren()); - } - - /** - * @return array - */ - public function getOptions() - { - return $this->options; - } - - /** - * @param array $options - */ - public function setOptions(array $options = []) - { - $this->options = $options; - } - - /** - * @return GroupsPriceBoard - */ - public function getBoard() - { - return $this->board; - } - - /** - * @param GroupsPriceBoard $board - */ - public function setBoard(GroupsPriceBoard $board = null) - { - $this->board = $board; - } - - /** - * @return array - */ - public function getSummary() - { - return $this->summary; - } - - /** - * @param array $summary - */ - public function setSummary(array $summary) - { - $this->summary = $summary; - } -} diff --git a/packages/ep_products/Classes/Domain/Model/Travelinfo.php b/packages/ep_products/Classes/Domain/Model/Travelinfo.php deleted file mode 100644 index ad55bf2..0000000 --- a/packages/ep_products/Classes/Domain/Model/Travelinfo.php +++ /dev/null @@ -1,329 +0,0 @@ - - */ - protected $teasers; - - /** - * @var ObjectStorage - */ - protected $links; - - /** - * @var string - */ - protected $travelCode; - - /** - * @var Product - */ - protected $product; - - /** - * @var bool - */ - protected $hideAddress = false; - - public function __construct() - { - $this->initStorageObjects(); - } - - protected function initStorageObjects() - { - $this->teasers = new ObjectStorage(); - $this->links = new ObjectStorage(); - } - - /** - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * @param string $title - */ - public function setTitle($title) - { - $this->title = $title; - } - - public function getHeaderImage() - { - return $this->headerImage; - } - - public function setHeaderImage($headerImage) - { - $this->headerImage = $headerImage; - - return $this; - } - - public function getFooterImage() - { - return $this->footerImage; - } - - public function setFooterImage($footerImage) - { - $this->footerImage = $footerImage; - - return $this; - } - - public function getSubline() - { - return $this->subline; - } - - public function setSubline($subline) - { - $this->subline = $subline; - - return $this; - } - - public function getHeadline() - { - return $this->headline; - } - - public function setHeadline($headline) - { - $this->headline = $headline; - - return $this; - } - - public function getIntroText() - { - return $this->introText; - } - - public function setIntroText($introText) - { - $this->introText = $introText; - - return $this; - } - - public function getBusInfoText() - { - return $this->busInfoText; - } - - public function setBusInfoText($busInfoText) - { - $this->busInfoText = $busInfoText; - - return $this; - } - - public function getDepartureText() - { - return $this->departureText; - } - - public function setDepartureText($departureText) - { - $this->departureText = $departureText; - - return $this; - } - - public function getFooterText() - { - return $this->footerText; - } - - public function setFooterText($footerText) - { - $this->footerText = $footerText; - - return $this; - } - - public function getAdditionalInfo() - { - return $this->additionalInfo; - } - - public function setAdditionalInfo($additionalInfo) - { - $this->additionalInfo = $additionalInfo; - - return $this; - } - - public function getImportantPhoneNumbers() - { - return $this->importantPhoneNumbers; - } - - public function setImportantPhoneNumbers($importantPhoneNumbers) - { - $this->importantPhoneNumbers = $importantPhoneNumbers; - - return $this; - } - - public function getImportantLinks() - { - return $this->importantLinks; - } - - public function setImportantLinks($importantLinks) - { - $this->importantLinks = $importantLinks; - - return $this; - } - - public function getSelfArrangedText() - { - return $this->selfArrangedText; - } - - public function setSelfArrangedText($selfArrangedText) - { - $this->selfArrangedText = $selfArrangedText; - - return $this; - } - - public function getTeasers() - { - return $this->teasers; - } - - public function setTeasers($teasers) - { - $this->teasers = $teasers; - } - - public function getLinks() - { - return $this->links; - } - - public function setLinks($links) - { - $this->links = $links; - - return $this; - } - - public function getTravelCode() - { - return $this->travelCode; - } - - public function setTravelCode($travelCode) - { - $this->travelCode = $travelCode; - - return $this; - } - - public function getProduct() - { - return $this->product; - } - - public function setProduct($product) - { - $this->product = $product; - return $this; - } - - public function isHideAddress() - { - return $this->hideAddress; - } - - public function setHideAddress($hideAddress) - { - $this->hideAddress = $hideAddress; - return $this; - } -} - diff --git a/packages/ep_products/Classes/Domain/Model/TravelinfoLink.php b/packages/ep_products/Classes/Domain/Model/TravelinfoLink.php deleted file mode 100644 index b85bdcf..0000000 --- a/packages/ep_products/Classes/Domain/Model/TravelinfoLink.php +++ /dev/null @@ -1,61 +0,0 @@ -title; - } - - /** - * @param string $title - */ - public function setTitle($title) - { - $this->title = $title; - } - - public function getLink() - { - return $this->link; - } - - public function setLink($link) - { - $this->link = $link; - } - - public function getIcon() - { - return $this->icon; - } - - public function setIcon($icon) - { - $this->icon = $icon; - } -} - diff --git a/packages/ep_products/Classes/Domain/Model/TravelinfoTeaser.php b/packages/ep_products/Classes/Domain/Model/TravelinfoTeaser.php deleted file mode 100644 index ae15345..0000000 --- a/packages/ep_products/Classes/Domain/Model/TravelinfoTeaser.php +++ /dev/null @@ -1,76 +0,0 @@ -title; - } - - /** - * @param string $title - */ - public function setTitle($title) - { - $this->title = $title; - } - - public function getBodytext() - { - return $this->bodytext; - } - - public function setBodytext($bodytext) - { - $this->bodytext = $bodytext; - } - - public function getCategory() - { - return $this->category; - } - - public function setCategory($category) - { - $this->category = $category; - } - - public function getImage() - { - return $this->image; - } - - public function setImage($image) - { - $this->image = $image; - } -} - diff --git a/packages/ep_products/Classes/Domain/Repository/FaqRepository.php b/packages/ep_products/Classes/Domain/Repository/FaqRepository.php deleted file mode 100644 index ffd7e7a..0000000 --- a/packages/ep_products/Classes/Domain/Repository/FaqRepository.php +++ /dev/null @@ -1,62 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Faq; -use TYPO3\CMS\Core\Database\Connection; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper; - -class FaqRepository extends AbstractRepository -{ - - /** - * @param string $uids - * @return array - * @throws \Doctrine\DBAL\DBALException - */ - public function findByUids($uids) - { - /** @var DataMapper $dataMapper */ - $dataMapper = $this->objectManager->get(DataMapper::class); - $qb = $this->getDbConnection()->createQueryBuilder(); - - $rows = $qb - ->select('*') - ->from('tx_epproducts_domain_model_faq') - ->where('uid IN (:uids)') - ->add('orderBy', 'FIELD(uid, ' . $uids . ')') - ->setParameter('uids', GeneralUtility::trimExplode(',', $uids), Connection::PARAM_INT_ARRAY) - ->execute() - ->fetchAllAssociative() - ; - - return $dataMapper->map(Faq::class, $rows); - } - -} diff --git a/packages/ep_products/Classes/Domain/Repository/GroupsPriceOptionRepository.php b/packages/ep_products/Classes/Domain/Repository/GroupsPriceOptionRepository.php deleted file mode 100644 index 0148617..0000000 --- a/packages/ep_products/Classes/Domain/Repository/GroupsPriceOptionRepository.php +++ /dev/null @@ -1,56 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; -use TYPO3\CMS\Extbase\Persistence\Repository; - -class GroupsPriceOptionRepository extends Repository -{ - /** - * @param array $uids - * @return array - * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException - */ - public function findByUids(array $uids) - { - if (0 === count($uids)) { - return []; - } - - /** @var Typo3QuerySettings $querySettings */ - $querySettings = $this->objectManager->get(Typo3QuerySettings::class); - $querySettings->setRespectStoragePage(false); - $this->setDefaultQuerySettings($querySettings); - - $query = $this->createQuery(); - $query->matching($query->in('uid', $uids)); - - return $query->execute()->toArray(); - } -} diff --git a/packages/ep_products/Classes/Domain/Repository/MatchCodeRepository.php b/packages/ep_products/Classes/Domain/Repository/MatchCodeRepository.php deleted file mode 100644 index a5a4427..0000000 --- a/packages/ep_products/Classes/Domain/Repository/MatchCodeRepository.php +++ /dev/null @@ -1,31 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -class MatchCodeRepository extends AbstractRepository -{} diff --git a/packages/ep_products/Classes/Domain/Repository/ResellerRepository.php b/packages/ep_products/Classes/Domain/Repository/ResellerRepository.php deleted file mode 100644 index eb02598..0000000 --- a/packages/ep_products/Classes/Domain/Repository/ResellerRepository.php +++ /dev/null @@ -1,31 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -class ResellerRepository extends AbstractRepository -{} diff --git a/packages/ep_products/Classes/Domain/Repository/RoomRepository.php b/packages/ep_products/Classes/Domain/Repository/RoomRepository.php deleted file mode 100644 index 90a8e36..0000000 --- a/packages/ep_products/Classes/Domain/Repository/RoomRepository.php +++ /dev/null @@ -1,31 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -class RoomRepository extends AbstractRepository -{} diff --git a/packages/ep_products/Classes/Domain/Repository/SnowreportRepository.php b/packages/ep_products/Classes/Domain/Repository/SnowreportRepository.php deleted file mode 100644 index bde5d50..0000000 --- a/packages/ep_products/Classes/Domain/Repository/SnowreportRepository.php +++ /dev/null @@ -1,71 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3\CMS\Core\Database\Connection; - -class SnowreportRepository extends AbstractRepository -{ - - /** - * @param array $regionUids - * @return array - * @throws \Doctrine\DBAL\DBALException - */ - public function getSnowreportsForRegions(array $regionUids = null) - { - $qb = $this->getDbConnection()->createQueryBuilder(); - - $query = $qb - ->select( - 'snowreport.*', - 'region.name as regionName', 'region.uid as regionUid', 'region.detail_page as regionDetailPage', - 'country.name as countryName', 'country.uid as countryUid', 'country.code as countryCode', - 'country.detail_page as countryDetailPage', - 'season_start as seasonStart', 'season_end as seasonEnd' - ) - ->addSelectLiteral('(UNIX_TIMESTAMP() >= snowreport.season_start AND UNIX_TIMESTAMP() <= snowreport.season_end) as inSeason') - ->from('tx_epproducts_domain_model_snowreport', 'snowreport') - ->innerJoin('snowreport', 'tx_epproducts_domain_model_region', 'region', 'snowreport.uid = region.snowreport') - ->innerJoin('region', 'tx_epproducts_domain_model_country', 'country', 'region.country = country.uid') - ->where('region.snowreport > 0') - ->groupBy('snowreport.vendor_uid') - ->orderBy('region.name') - ; - - if ($regionUids) { - $qb - ->andWhere('region.uid IN (:regionUids)') - ->setParameter('regionUids', $regionUids, Connection::PARAM_INT_ARRAY) - ; - } - - return $query->execute()->fetchAllAssociative(); - } - -} diff --git a/packages/ep_products/Classes/Domain/Repository/TeammemberRepository.php b/packages/ep_products/Classes/Domain/Repository/TeammemberRepository.php deleted file mode 100644 index 9e64a20..0000000 --- a/packages/ep_products/Classes/Domain/Repository/TeammemberRepository.php +++ /dev/null @@ -1,52 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -class TeammemberRepository extends AbstractRepository -{ - /** - * @var array - */ - protected $defaultOrderings = [ - 'sorting' => 'ASC', - ]; - - /** - * @param array $categories - * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface - * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException - */ - public function findByCategories(array $categories = []) - { - $qb = $this->createQuery(); - - $qb->matching($qb->in('categories.uid', $categories)); - - return $qb->execute(); - } -} diff --git a/packages/ep_products/Classes/Domain/Repository/TravelinfoRepository.php b/packages/ep_products/Classes/Domain/Repository/TravelinfoRepository.php deleted file mode 100644 index f62f188..0000000 --- a/packages/ep_products/Classes/Domain/Repository/TravelinfoRepository.php +++ /dev/null @@ -1,6 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -class WebcamRepository extends AbstractRepository -{} diff --git a/packages/ep_products/Classes/EpTeam/ApiClient.php b/packages/ep_products/Classes/EpTeam/ApiClient.php deleted file mode 100644 index b348592..0000000 --- a/packages/ep_products/Classes/EpTeam/ApiClient.php +++ /dev/null @@ -1,244 +0,0 @@ -request('POST', $uri, [ - 'json' => $payload, - ]); - - $statusCode = $this->readStatusCode($response, 'POST', $uri); - - if (false === in_array($statusCode, self::ACCEPTED_STATUS_CODES, true)) { - $message = sprintf( - 'EP Team API returned unexpected status %d for POST %s: %s', - $statusCode, - $uri, - $this->readErrorBody($response) - ); - $this->logWarning($message); - - throw new ApiException($message, $statusCode); - } - - $this->logAcceptedSubmission($response, $payload); - } - - /** - * @throws ApiException - */ - private function request(string $method, string $uri, array $options): ResponseInterface - { - try { - return $this->getHttpClient()->request($method, $uri, $options); - } catch (TransportExceptionInterface $e) { - $message = sprintf('EP Team API transport error for %s %s: %s', $method, $uri, $e->getMessage()); - $this->logError($message, ['exception' => $e]); - - throw new ApiException($message, 0, $e); - } - } - - /** - * Reading the status completes the transfer, so this is also what turns the lazy response - * returned by the client into a finished request. - * - * @throws ApiException - */ - private function readStatusCode(ResponseInterface $response, string $method, string $uri): int - { - try { - return $response->getStatusCode(); - } catch (TransportExceptionInterface $e) { - $message = sprintf('EP Team API transport error while reading status for %s %s: %s', $method, $uri, $e->getMessage()); - $this->logError($message, ['exception' => $e]); - - throw new ApiException($message, 0, $e); - } - } - - private function readErrorBody(ResponseInterface $response): string - { - try { - $body = trim($response->getContent(false)); - } catch (TransportExceptionInterface $e) { - return ''; - } - - if ('' === $body) { - return ''; - } - - if (mb_strlen($body) > self::ERROR_BODY_EXCERPT_LENGTH) { - $body = mb_substr($body, 0, self::ERROR_BODY_EXCERPT_LENGTH) . '…'; - } - - return $body; - } - - /** - * The submission uuid the endpoint returns is what makes a support question ("did our - * application arrive?") answerable from the TYPO3 log alone. Reading the body also drains - * the response, which returns the connection to the pool instead of cancelling the transfer. - * Deliberately without any of the submitted values: these payloads are personal data. - */ - private function logAcceptedSubmission(ResponseInterface $response, array $payload): void - { - try { - $data = $response->toArray(false); - } catch (\Throwable $e) { - // A body that is absent (204) or not JSON costs nothing here - the submission is - // stored either way, which the asserted status has already established. - return; - } - - if (null !== $this->logger) { - $this->logger->info('Application form submission accepted by the EP Team API.', [ - 'form' => $payload['form'] ?? null, - 'pageUid' => $payload['pageUid'] ?? null, - 'uuid' => $data['uuid'] ?? null, - ]); - } - } - - /** - * @throws ApiException - */ - private function getHttpClient(): HttpClientInterface - { - if (null !== static::$httpClient) { - return static::$httpClient; - } - - $config = $this->getConfiguration(); - $baseUrl = trim((string)($config['epTeamApiBaseUrl'] ?? '')); - $apiKey = trim((string)($config['epTeamApiKey'] ?? '')); - - if ('' === $baseUrl) { - throw new ApiException('EP Team API base URL is not configured.'); - } - if ('' === $apiKey) { - throw new ApiException('EP Team API key is not configured.'); - } - if (0 !== strpos($baseUrl, 'https://')) { - // The application answers an http request with a 301 to the https URL, and this - // client does not follow redirects, so a plain http base URL fails every submission. - $this->logWarning(sprintf('EP Team API base URL is not https (%s); submissions will fail on the redirect.', $baseUrl)); - } - - $options = [ - 'headers' => [ - 'X-Api-Key' => $apiKey, - ], - ]; - - // Without these the client falls back to PHP's default_socket_timeout (commonly 60s), - // so a stalled API pins a PHP worker for a minute per request - and this call happens - // inside the visitor's form submission, with the visitor waiting for it. The defaults - // live in code rather than in ext_conf_template.txt: ExtensionConfiguration::get() - // returns the stored configuration verbatim and only syncs the template when an - // extension has no configuration at all, so a newly added template key is absent until - // someone saves extension configuration by hand. Falling back to 0 there would silently - // mean "no timeout" - the opposite of what this guard is for. An explicit 0 still - // disables. - $timeout = (int)($config['epTeamApiTimeout'] ?? self::DEFAULT_TIMEOUT); - if ($timeout > 0) { - $options['timeout'] = $timeout; - } - $maxDuration = (int)($config['epTeamApiMaxDuration'] ?? self::DEFAULT_MAX_DURATION); - if ($maxDuration > 0) { - $options['max_duration'] = $maxDuration; - } - - return static::$httpClient = HttpClient::createForBaseUri(rtrim($baseUrl, '/') . '/', $options); - } - - private function getConfiguration(): array - { - if (null === $this->configuration) { - $this->configuration = GeneralUtility::makeInstance(ExtensionConfiguration::class) - ->get('ep_products'); - } - - return $this->configuration; - } - - private function logError(string $message, array $context = []): void - { - if (null !== $this->logger) { - $this->logger->error($message, $context); - } - } - - private function logWarning(string $message, array $context = []): void - { - if (null !== $this->logger) { - $this->logger->warning($message, $context); - } - } -} diff --git a/packages/ep_products/Classes/EpTeam/ApiException.php b/packages/ep_products/Classes/EpTeam/ApiException.php deleted file mode 100644 index e0d7d2c..0000000 --- a/packages/ep_products/Classes/EpTeam/ApiException.php +++ /dev/null @@ -1,7 +0,0 @@ -readImportTimestamp('fileadmin/products_import.info'); - $contingentsDataUpdatedTimestamp = $timestampService->readImportTimestamp('fileadmin/contingents_import.info'); - - $event->getToolbarItem()->addSystemInformation( - 'Letzer Produktdaten-Import', - $productDataUpdatedTimestamp ? $productDataUpdatedTimestamp->format('d.m.y H:i:s') : '-', - 'ep-logo' - ); - $event->getToolbarItem()->addSystemInformation( - 'Letzer Kontingente Import', - $contingentsDataUpdatedTimestamp ? $contingentsDataUpdatedTimestamp->format('d.m.y H:i:s') : '-', - 'ep-logo' - ); - } -} diff --git a/packages/ep_products/Classes/Hooks/PageLayoutView.php b/packages/ep_products/Classes/Hooks/PageLayoutView.php deleted file mode 100644 index 43fbf4e..0000000 --- a/packages/ep_products/Classes/Hooks/PageLayoutView.php +++ /dev/null @@ -1,258 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Backend\View\PageLayoutView as CorePageLayoutView; -use TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface; -use TYPO3\CMS\Core\Service\FlexFormService; -use TYPO3\CMS\Core\Utility\GeneralUtility; - -class PageLayoutView implements PageLayoutViewDrawItemHookInterface -{ - - /** - * @param CorePageLayoutView $parentObject - * @param bool $drawItem - * @param string $headerContent - * @param string $itemContent - * @param array $row - */ - public function preProcess(CorePageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row) { - // Country detail - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_country_detail') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $countryUid = $flexFormData['settings']['countryUid']; - $name = $this->getName('country', $countryUid); - $itemContent = 'Detailseite Land
' . $name; - } - - // Region teaser - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_region_teasergroup') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $countryUid = $flexFormData['settings']['countryUid']; - $name = $this->getName('country', $countryUid); - $itemContent = 'Teasergruppe Gebiete
' . $name; - } - - // Region detail - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_region_detail') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $regionUid = $flexFormData['settings']['regionUid']; - $name = $this->getName('region', $regionUid); - $itemContent = 'Detailseite Gebiet
' . $name; - } - - // City teaser - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_city_teasergroup') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $countryUid = $flexFormData['settings']['countryUid']; - $regionUid = $flexFormData['settings']['regionUid']; - $record = []; - if ((int) $regionUid > 0) { - $name = $this->getName('region', $regionUid); - } elseif ((int) $countryUid > 0) { - $name = $this->getName('country', $countryUid); - } - $itemContent = 'Teasergruppe Orte
'; - if (count($record) > 0) { - $itemContent .= $name; - } - } - - // City detail - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_city_detail') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $cityUid = $flexFormData['settings']['cityUid']; - $name = $this->getName('city', $cityUid); - $itemContent = 'Detailseite Ort
' . $name; - } - - // Hotel Teaser - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_hotel_teasergroup') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $countryUid = $flexFormData['settings']['countryUid']; - $regionUid = $flexFormData['settings']['reguionUid']; - $cityUid = $flexFormData['settings']['cityUid']; - $name = ''; - if ((int) $cityUid > 0) { - $name = $this->getName('city', $cityUid); - } elseif ((int) $regionUid > 0) { - $name = $this->getName('region', $regionUid); - } elseif ((int) $countryUid > 0) { - $name = $this->getName('country', $countryUid); - } - $itemContent = 'Teasergruppe Hotels
' . $name; - } - - // Hotel detail - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_hotel_detail') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $hotelUid = $flexFormData['settings']['hotelUid']; - $name = $this->getName('hotel', $hotelUid); - $itemContent = 'Detailseite Hotel
' . $name; - } - - // FAQ - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_faq') { - $flexFormData = $this->getFlexFormData($row); - $faqUids = GeneralUtility::trimExplode(',', $flexFormData['settings']['faqUids']); - $drawItem = false; - $itemContent = 'FAQ
' . count($faqUids) . ' Frage(n)'; - } - - // Product pricetable - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_product_pricetable') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $itemContent = 'Buchungstabelle
'; - $productUid = $flexFormData['settings']['productUid']; - $record = BackendUtility::getRecord('tx_epproducts_domain_model_product', $productUid); - $itemContent .= $record['name']; - $hotelUid = $flexFormData['settings']['hotelUid']; - $record = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $hotelUid); - $itemContent .= ', ' . $record['name']; - } - - // Product detail - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_product_detail') { - $flexFormData = $this->getFlexFormData($row); - $drawItem = false; - $itemContent = 'Produkt
'; - $productUid = $flexFormData['settings']['productUid']; - if ((int) $productUid === 0) { - $itemContent .= 'allgemein'; - } else { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_product', $productUid); - $itemContent .= $record['name_internal'] ? $record['name_internal'] : $record['name']; - $hotelUid = $flexFormData['settings']['hotelUid']; - if ((int) $hotelUid > 0) { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $hotelUid); - $itemContent .= ', ' . $record['name']; - } - } - } - - // Product teaser - if ($row['CType'] === 'list' && $row['list_type'] === 'epproducts_product_teasergroup') { - $flexFormData = $this->getFlexFormData($row); - $mode = $this->getMode($flexFormData); - $drawItem = false; - switch ($mode) - { - case 'teasergroup': - $itemContent = 'Teasergruppe Produkte
'; - $filterParts = []; - $countryUid = $flexFormData['settings']['countryUid']; - if ((int) $countryUid > 0) { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_country', $countryUid); - $filterParts[] = $record['name']; - } - $regionUid = $flexFormData['settings']['regionUid']; - if ((int) $regionUid > 0) { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_region', $regionUid); - $filterParts[] = $record['name']; - } - $conceptUid = $flexFormData['settings']['conceptUid']; - if ((int) $conceptUid > 0) { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_concept', $conceptUid); - $filterParts[] = $record['name']; - } - $hotelUid = $flexFormData['settings']['hotelUid']; - if ((int) $hotelUid > 0) { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $hotelUid); - $filterParts[] = $record['name']; - } - if ($flexFormData['settings']['dateFrom']) { - $filterParts[] = 'von ' . date('d.m.Y', $flexFormData['settings']['dateFrom']); - } - if ($flexFormData['settings']['dateTo']) { - $filterParts[] = 'bis ' . date('d.m.Y', $flexFormData['settings']['dateTo']); - } - if ((bool) $flexFormData['settings']['busAvailable'] === true) { - $filterParts[] = 'Busreisen'; - } - $itemContent .= implode(', ', $filterParts); - break; - case 'single': - $itemContent = 'Teaser Produkt
'; - $productUid = $flexFormData['settings']['productUid']; - $record = BackendUtility::getRecord('tx_epproducts_domain_model_product', $productUid); - $itemContent .= $record['name']; - $hotelUid = $flexFormData['settings']['hotelUid']; - if ((int) $hotelUid > 0) { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $hotelUid); - $itemContent .= ', ' . $record['name']; - } - break; - } - } - - } - - /** - * @param array $row - * @return array - */ - protected function getFlexFormData(array $row) - { - /** @var FlexFormService $flexFormService */ - $flexFormService = GeneralUtility::makeInstance(FlexFormService::class); - return $flexFormService->convertFlexFormContentToArray($row['pi_flexform']); - } - - /** - * @param array $flexFormData - * @return string - */ - protected function getMode(array $flexFormData) - { - $controllerAction = $flexFormData['switchableControllerActions']; - return substr($controllerAction, strpos($controllerAction, '>') + 1); - } - - /** - * @param string $type - * @param integer $uid - * - * @return string - */ - protected function getName($type, $uid) - { - $record = BackendUtility::getRecord('tx_epproducts_domain_model_' . $type, $uid); - return $record['name']; - } - -} diff --git a/packages/ep_products/Classes/Hooks/Tcemain.php b/packages/ep_products/Classes/Hooks/Tcemain.php deleted file mode 100644 index 55ef7e7..0000000 --- a/packages/ep_products/Classes/Hooks/Tcemain.php +++ /dev/null @@ -1,119 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Traits\DbConnectionTrait; -use TYPO3\CMS\Core\DataHandling\DataHandler; -use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Messaging\FlashMessageService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; - -class Tcemain -{ - use DbConnectionTrait; - - /** - * @var array - */ - protected $tables = [ - 'tx_epproducts_domain_model_country', - 'tx_epproducts_domain_model_region', - 'tx_epproducts_domain_model_city' - ]; - - /** - * @param array $fields - * @param string $table - * @param int $id - * @param DataHandler $obj - * @throws \Doctrine\DBAL\DBALException - */ - public function processDatamap_preProcessFieldArray(array &$fields, $table, $id, DataHandler $obj) - { - // Render flash message in case of duplicate entry - if ($table === 'tx_epproducts_domain_model_matchcode' && $fields['code'] !== '') { - $code = $fields['code']; - $qb = $this->getDbConnection()->createQueryBuilder(); - $query = $qb - ->select('uid') - ->from('tx_epproducts_domain_model_matchcode') - ->where('code = :code') - ->andWhere('deleted = 0') - ->setParameter('code', $code) - ; - if (is_numeric($id)) { - $query - ->andWhere('uid != :uid') - ->setParameter('uid', $id) - ; - } - $existing = $query->execute()->fetch(); - if ($existing) { - $this->addFlashMessage('Der Hotelcode ' . $code . ' ist schon vergeben worden.', 'Hinweis', FlashMessage::WARNING); - } - } - if ($table === 'tx_epproducts_domain_model_product' && $fields['code'] !== '') { - $code = $fields['code']; - $qb = $this->getDbConnection()->createQueryBuilder(); - $query = $qb - ->select('uid') - ->from('tx_epproducts_domain_model_product') - ->where('code = :code') - ->andWhere('deleted = 0') - ->setParameter('code', $code); - if (is_numeric($id)) { - $query - ->andWhere('uid != :uid') - ->setParameter('uid', $id) - ; - } - $existing = $query->execute()->fetch(); - if ($existing) { - $this->addFlashMessage('Der Productcode ' . $code . ' ist schon vergeben worden.', 'Hinweis', FlashMessage::WARNING); - } - } - } - - /** - * @param string $message - * @param string $title - * @param int $severity - */ - protected function addFlashMessage($message, $title, $severity) - { - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - /** @var \TYPO3\CMS\Core\Messaging\FlashMessageService $flashMessageService */ - $flashMessageService = $objectManager->get(FlashMessageService::class); - $messageQueue = $flashMessageService->getMessageQueueByIdentifier(); - /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */ - $message = GeneralUtility::makeInstance(FlashMessage::class, $message, $title, $severity, true); - $messageQueue->addMessage($message); - } - -} diff --git a/packages/ep_products/Classes/Middleware/StagingEnvironmentMiddleware.php b/packages/ep_products/Classes/Middleware/StagingEnvironmentMiddleware.php deleted file mode 100644 index f71aec7..0000000 --- a/packages/ep_products/Classes/Middleware/StagingEnvironmentMiddleware.php +++ /dev/null @@ -1,43 +0,0 @@ -getQueryParams(); - - if (!isset($queryParams['ep_staging'])) { - return $handler->handle($request); - } - - $isStaging = '1' === (string) $queryParams['ep_staging']; - - // Update $_COOKIE so the value is available during the current request - if ($isStaging) { - $_COOKIE[self::COOKIE_NAME] = '1'; - } else { - unset($_COOKIE[self::COOKIE_NAME]); - } - - $response = $handler->handle($request); - - // Set the cookie on the response for subsequent browser requests - if ($isStaging) { - $cookie = new Cookie(self::COOKIE_NAME, '1', 0, '/', null, false, true, false, Cookie::SAMESITE_LAX); - } else { - $cookie = new Cookie(self::COOKIE_NAME, '', 1, '/', null, false, true, false, Cookie::SAMESITE_LAX); - } - - return $response->withAddedHeader('Set-Cookie', (string) $cookie); - } -} diff --git a/packages/ep_products/Classes/Middleware/StaticSearchParamsMiddleware.php b/packages/ep_products/Classes/Middleware/StaticSearchParamsMiddleware.php deleted file mode 100644 index 82fbeb8..0000000 --- a/packages/ep_products/Classes/Middleware/StaticSearchParamsMiddleware.php +++ /dev/null @@ -1,71 +0,0 @@ -getAttribute('normalizedParams'); - $uri = $params->getRequestUri(); - - if (strpos($uri, self::PREFIX_PATH_SEGMENT) === false) { - return $handler->handle($request); - } - - // Ensure trailing slash for comparison - $uri = rtrim($uri, '/') . '/'; - - $qb = $this->getDbConnection()->createQueryBuilder(); - - $query = $qb - ->select('*') - ->from('tx_epproducts_domain_model_staticsearchparams') - ->where('CONCAT("/", :prefix, "/", path_segment, "/")=LOWER(:uri)') - ->andWhere('deleted = 0') - ->andWhere('hidden = 0') - ->setParameters([ - 'prefix' => self::PREFIX_PATH_SEGMENT, - 'uri' => $uri, - ]) - ; - - $row = $query->execute()->fetchAssociative(); - - if (!$row) { - return $handler->handle($request); - } - - $filterService = GeneralUtility::makeInstance(FilterService::class); - - $filterSettings = $filterService->getFilterSettingsFromStaticSearchParams($row); - $filterSettingsEncoder = new FilterSettingsEncoder(); - $encodedFilterSettings = $filterSettingsEncoder->encode($filterSettings); - - $searchPageUid = GeneralUtility::makeInstance(ExtensionConfiguration::class) - ->get('ep_products', 'searchPageUid'); - - $site = $request->getAttribute('site'); - $redirectUri = $site->getRouter()->generateUri($searchPageUid, ['f' => $encodedFilterSettings]); - - return new RedirectResponse($redirectUri, self::REDIRECT_RESPONSE_CODE); - } -} diff --git a/packages/ep_products/Classes/Service/ContingentImportService.php b/packages/ep_products/Classes/Service/ContingentImportService.php deleted file mode 100644 index bf99af8..0000000 --- a/packages/ep_products/Classes/Service/ContingentImportService.php +++ /dev/null @@ -1,341 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use Doctrine\DBAL\Connection; -use EP\EpProducts\Domain\Model\Contingent; -use EP\EpProducts\Traits\DbConnectionTrait; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use TYPO3\CMS\Core\SingletonInterface; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; - -class ContingentImportService implements SingletonInterface, LoggerAwareInterface -{ - use LoggerAwareTrait; - use DbConnectionTrait; - - public const XML_PATH = 'fileadmin/xmlexportzimmer'; - public const ROOMCODE_STATUS = 'BelKal'; - - /** - * @var string[] - */ - // protected $ignoredRoomTypes = ['PDGS', 'TEAM']; - protected $ignoredRoomTypes = ['PDGS']; - - /** - * @var ConfigurationManagerInterface - */ - protected $configurationManager; - - /** - * @var int - */ - protected $contingentsPid = 0; - - /** - * @var int - */ - protected $hotelsPid = 0; - - /** - * @var Connection - */ - protected $db; - - /** - * @throws \Doctrine\DBAL\DBALException - */ - public function __construct(ConfigurationManagerInterface $manager) - { - $this->configurationManager = $manager; - - $settings = GeneralUtility::removeDotsFromTS( - $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT) - ); - - if (isset($settings['plugin']['tx_epproducts']['persistence']['storagePid'])) { - $this->contingentsPid = $settings['plugin']['tx_epproducts']['persistence']['storagePid']; - } elseif (isset($settings['module']['tx_epproducts']['persistence']['storagePid'])) { - $this->contingentsPid = $settings['module']['tx_epproducts']['persistence']['storagePid']; - } - - if (isset($settings['plugin']['tx_epproducts']['settings']['hotelsPid'])) { - $this->hotelsPid = $settings['plugin']['tx_epproducts']['settings']['hotelsPid']; - } elseif (isset($settings['module']['tx_epproducts']['settings']['hotelsPid'])) { - $this->hotelsPid = $settings['module']['tx_epproducts']['settings']['hotelsPid']; - } - - $this->db = $this->getDbConnection(); - } - - /** - * @return int - * - * @throws \Doctrine\DBAL\DBALException - */ - public function import() - { - $this->createTempTable(); - $this->logger->info('starting product import'); - $contingentCount = $this->parseXmlFilesInFolder(); - $this->clearTable(); - $this->copyTable(); - $this->clearTempTable(); - - return $contingentCount; - } - - public function isImportRequired(): bool - { - $timestampService = new ImportTimestampService(); - - return $timestampService->isImportRequired( - 'fileadmin/xmlexportzimmer/uebertragung.info', - 'fileadmin/contingents_import.info' - ); - } - - /** - * @return int - */ - public function parseXmlFilesInFolder() - { - $dateCount = 0; - $path = GeneralUtility::getFileAbsFileName(self::XML_PATH); - $folder = opendir($path); - while (($fileName = readdir($folder)) !== false) { - if (0 === strpos($fileName, 'HotelZimmer')) { - $dateCount += $this->parseContingentXmlFile($path, $fileName); - } - } - - return $dateCount; - } - - /** - * @param string $fileName - * - * @return int - */ - public function parseContingentXmlFile($path, $fileName) - { - $filePath = sprintf('%s/%s', $path, $fileName); - - if (null === $xmlData = $this->loadXmlFile($filePath)) { - return 0; - } - - return $this->parseContingent($xmlData); - } - - public function loadXmlFile($file): ?\SimpleXMLElement - { - libxml_use_internal_errors(true); - if (!file_exists($file)) { - return null; - } - /** @var \SimpleXMLElement $xmlData */ - if (!$xmlData = simplexml_load_string(file_get_contents($file))) { - libxml_clear_errors(); - - return null; - } - - return $xmlData; - } - - /** - * @throws \Doctrine\DBAL\DBALException - */ - public function createTempTable() - { - $this->db->executeStatement('CREATE TABLE IF NOT EXISTS tx_epproducts_domain_model_contingent_temp LIKE tx_epproducts_domain_model_contingent'); - } - - /** - * @throws \Doctrine\DBAL\DBALException - */ - public function clearTable() - { - $this->db->executeStatement('TRUNCATE TABLE tx_epproducts_domain_model_contingent'); - } - - /** - * @throws \Doctrine\DBAL\DBALException - */ - public function copyTable() - { - $this->db->executeStatement('INSERT INTO tx_epproducts_domain_model_contingent SELECT * FROM tx_epproducts_domain_model_contingent_temp'); - } - - /** - * @throws \Doctrine\DBAL\DBALException - */ - public function clearTempTable() - { - $this->db->executeStatement('TRUNCATE TABLE tx_epproducts_domain_model_contingent_temp'); - } - - /** - * @return int - */ - protected function parseContingent(\SimpleXMLElement $xmlContingent) - { - $hotelCode = (string) $xmlContingent['code']; - $sql = 'SELECT h.uid uid - FROM tx_epproducts_domain_model_hotel h - WHERE h.deleted = 0 AND h.hidden = 0 AND h.code = :code AND h.pid = :pid - LIMIT 0,1'; - $hotelData = $this->db->fetchAssociative($sql, ['code' => $hotelCode, 'pid' => $this->hotelsPid]); - - // Skip import in case hotel can't be found - if (false === $hotelData) { - $this->logger->warning('hotel not found', ['code' => $hotelCode]); - - return 0; - } - - $hotelData['busProId'] = (string) $xmlContingent['idbuspro']; - $hotelData['code'] = (string) $xmlContingent['code']; - - if ($xmlContingent->idbuspro_kontingent_aus) { - $linkedProductId = (int) $xmlContingent->idbuspro_kontingent_aus; - $path = GeneralUtility::getFileAbsFileName(self::XML_PATH); - if (null === $xmlContingent = $this->loadXmlFile(sprintf('%s/HotelZimmer_%d.xml', $path, $linkedProductId))) { - return 0; - } - } - - if (empty($xmlContingent->kapazitaeten)) { - $this->logger->warning('hotel has no contingents', ['code' => $hotelCode]); - - return 0; - } - - $roomTypes = $this->parseRoomTypes($xmlContingent->unterbringungen); - - return $this->parseRooms($xmlContingent->kapazitaeten, $hotelData, $roomTypes); - } - - /** - * @param \SimpleXMLElement $xmlTypes - * - * @return array - */ - protected function parseRoomTypes($xmlTypes) - { - $types = []; - foreach ($xmlTypes->unterbringung as $xmlType) { - $idBusPro = (string) $xmlType['idbuspro']; - $code = (string) $xmlType['code']; - $types[] = [ - 'idBusPro' => $idBusPro, - 'link' => isset($xmlType['idbuspro_kontingent_aus']) ? (string) $xmlType['idbuspro_kontingent_aus'] : null, - 'pax' => (int) $xmlType['pax_max'], - 'code' => $code, - 'label' => (string) $xmlType['zimmerbezeichnung'], - 'ctrl' => self::ROOMCODE_STATUS === $code, - ]; - } - - return $types; - } - - /** - * @param \SimpleXMLElement|\SimpleXMLElement[] $xmlDates - * - * @return int - */ - protected function parseRooms(\SimpleXMLElement $xmlDates, array $hotelData, array $roomTypes) - { - $dateCount = 0; - foreach ($xmlDates->kapazitaet as $xmlDate) { - $date = \DateTime::createFromFormat('d.m.Y', (string) $xmlDate['termin']); - foreach ($roomTypes as $roomType) { - $roomCode = $roomType['code']; - if (in_array($roomCode, $this->ignoredRoomTypes, true)) { - continue; - } - $roomTypeBusProId = $roomType['link'] ?: $roomType['idBusPro']; - $xpath = sprintf('zimmerliste/zimmer[@idbuspro="%d"]', $roomTypeBusProId); - $xmlRoom = $xmlDate->xpath($xpath)[0]; - if (null === $xmlRoom) { - continue; - } - $this->calculateContingent($xmlRoom, $roomType, $date, $hotelData); - } - ++$dateCount; - } - - return $dateCount; - } - - protected function calculateContingent(\SimpleXMLElement $xmlRoom, array $roomType, \DateTime $date, array $hotelData): void - { - $availablePax = 0; - $capacity = 0; - $status = Contingent::STATUS_OK; - $isControlRoom = true === $roomType['ctrl']; - if ($isControlRoom && 'A' === (string) $xmlRoom['status']) { - $status = Contingent::STATUS_ONREQUEST; - } elseif ($isControlRoom && 'S' === (string) $xmlRoom['status']) { - $status = Contingent::STATUS_BLOCKED; - } else { - $capacity = (int) $xmlRoom['kontingent'] * (int) $roomType['pax']; - $availableRooms = (int) $xmlRoom['frei'] > 0 ? (int) $xmlRoom['frei'] : 0; - $availablePax = $availableRooms * $roomType['pax']; - } - $minPrice = (int) $xmlRoom['abpreis']; - $minNights = (int) $xmlRoom['abpreis_naechte']; - $additionalNightMinPrice = (int) $xmlRoom['abpreis_verlaengerung']; - $additionalNightMinNights = (int) $xmlRoom['abpreis_verlaengerung_naechte']; - $roomLabel = $roomType['label']; - $this->db->insert( - 'tx_epproducts_domain_model_contingent_temp', - [ - 'pid' => $this->contingentsPid, - 'hotel' => $hotelData['uid'], - 'hotel_code' => $hotelData['code'], - 'hotel_bus_pro_id' => $hotelData['busProId'], - 'room_code' => $roomType['code'], - 'room_label' => $roomLabel, - 'pax' => $capacity, - 'available' => $availablePax, - 'status' => $status, - 'date' => $date->format('Y-m-d'), - 'min_price' => $minPrice, - 'min_nights' => $minNights, - 'additional_night_min_price' => $additionalNightMinPrice, - 'additional_night_min_nights' => $additionalNightMinNights, - ] - ); - } -} diff --git a/packages/ep_products/Classes/Service/DateImportService.php b/packages/ep_products/Classes/Service/DateImportService.php index 210a5ed..30d665d 100644 --- a/packages/ep_products/Classes/Service/DateImportService.php +++ b/packages/ep_products/Classes/Service/DateImportService.php @@ -112,9 +112,9 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface protected $cacheService; /** - * @var ProductImportSourceFactory + * @var ProductImportSource */ - protected $importSourceFactory; + protected $importSource; /** * @var RoomTypeResolver @@ -131,18 +131,18 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface /** * @param ConfigurationManagerInterface $configurationManager * @param CacheService $cacheService - * @param ProductImportSourceFactory $importSourceFactory + * @param ProductImportSource $importSource * @param RoomTypeResolver $roomTypeResolver */ public function __construct( ConfigurationManagerInterface $configurationManager, CacheService $cacheService, - ProductImportSourceFactory $importSourceFactory, + ProductImportSource $importSource, RoomTypeResolver $roomTypeResolver ) { $this->configurationManager = $configurationManager; $this->cacheService = $cacheService; - $this->importSourceFactory = $importSourceFactory; + $this->importSource = $importSource; $this->roomTypeResolver = $roomTypeResolver; $settings = GeneralUtility::removeDotsFromTS( @@ -179,7 +179,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface public function isImportRequired(): bool { - return $this->importSourceFactory->get()->isNewImportAvailable(); + return $this->importSource->isNewImportAvailable(); } /** diff --git a/packages/ep_products/Classes/Service/EmailService.php b/packages/ep_products/Classes/Service/EmailService.php deleted file mode 100644 index 94bfda0..0000000 --- a/packages/ep_products/Classes/Service/EmailService.php +++ /dev/null @@ -1,90 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use Symfony\Component\Mime\Address; -use Symfony\Component\OptionsResolver\OptionsResolver; -use TYPO3\CMS\Core\Mail\FluidEmail; -use TYPO3\CMS\Core\Mail\Mailer; -use TYPO3\CMS\Core\SingletonInterface; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; - -class EmailService implements SingletonInterface -{ - /** - * @var array - */ - protected $settings; - - public function __construct(ConfigurationManagerInterface $manager) - { - $settings = GeneralUtility::removeDotsFromTS( - $manager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT) - ); - $this->settings = $settings['plugin']['tx_eptheme']; - } - - /** - * @param array $options - * @param array $variables - * @return bool - */ - public function send(array $options, array $variables) - { - $resolvedOptions = $this->resolveOptions($options); - - /** @var FluidEmail $email */ - $email = GeneralUtility::makeInstance(FluidEmail::class); - $email - ->to(new Address($resolvedOptions['toEmail'], $resolvedOptions['toName'])) - ->from(new Address($resolvedOptions['fromEmail'], $resolvedOptions['fromName'])) - ->subject($resolvedOptions['subject']) - ->setTemplate($resolvedOptions['templateName']) - ->assignMultiple($variables) - ; - - GeneralUtility::makeInstance(Mailer::class)->send($email); - } - - /** - * @param array $options - * @return array - */ - protected function resolveOptions(array $options) - { - $optionsResolver = new OptionsResolver(); - $optionsResolver->setDefined(['toEmail', 'toName', 'subject', 'templateName', 'fromEmail', 'fromName']); - $optionsResolver->setRequired(['toEmail', 'toName', 'subject', 'templateName']); - $optionsResolver->setDefaults([ - 'fromEmail' => $this->settings['settings']['contactFormToEmail'], - 'fromName' => $this->settings['settings']['contactFormToName'], - ]); - - return $optionsResolver->resolve($options); - } -} diff --git a/packages/ep_products/Classes/Service/GroupsSwissService.php b/packages/ep_products/Classes/Service/GroupsSwissService.php deleted file mode 100644 index 4b13942..0000000 --- a/packages/ep_products/Classes/Service/GroupsSwissService.php +++ /dev/null @@ -1,267 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\BpnConnect\ApiClient; -use EP\EpProducts\Domain\Repository\HotelRepository; -use League\Period\Period; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use TYPO3\CMS\Core\SingletonInterface; - -class GroupsSwissService implements SingletonInterface, LoggerAwareInterface -{ - use LoggerAwareTrait; - - /** - * @var HotelRepository - */ - protected $hotelRepository; - - /** - * @var ApiClient - */ - protected $apiClient; - - /** - * @var HttpClient - */ - protected $httpClient; - - /** - * @param HotelRepository $hotelRepository - * @param ApiClient $apiClient - */ - public function __construct(HotelRepository $hotelRepository, ApiClient $apiClient) - { - $this->hotelRepository = $hotelRepository; - $this->apiClient = $apiClient; - $this->httpClient = HttpClient::create(); - } - - public function publishContingents(int $hotelUid, int $houseNumber, string $apiKey): bool - { - $range = Period::after(new \DateTime('now'), '1 year'); - - $hotel = $this->hotelRepository->findByIdentifier($hotelUid); - - if (null === $hotel) { - $this->logger->error(sprintf('Hotel with uid %d not found', $hotelUid)); - return false; - } - - $hotelCode = trim((string) $hotel->getCode()); - if ('' === $hotelCode) { - $this->logger->error(sprintf('Hotel with uid %d has no hotel code', $hotelUid)); - return false; - } - - try { - $calendar = $this->apiClient->getCalendar( - $hotelCode, - \DateTime::createFromImmutable($range->getStartDate()), - \DateTime::createFromImmutable($range->getEndDate()->sub(new \DateInterval('P1D'))) - ); - $calendarRows = isset($calendar['data']) && is_array($calendar['data']) ? $calendar['data'] : []; - } catch (\Throwable $e) { - $this->logger->error(sprintf('No dates found for hotel with uid %d', $hotelUid), ['exception' => $e]); - return false; - } - - $this->resetChart($range, $apiKey, $houseNumber); - - $this->generateChart( - $calendarRows, - $apiKey, - $houseNumber - ); - - return true; - } - - /** - * @param Period $range - * @param string $apiKey - * @param string $houseNumber - */ - protected function resetChart(Period $range, $apiKey, $houseNumber): void - { - $item = [ - 'from' => $range->getStartDate(), - 'to' => $range->getEndDate(), - ]; - - $this->addItem($item, 0, $apiKey, $houseNumber); - } - - /** - * @param array $calendarRows - * @param string $apiKey - * @param int $houseNumber - */ - protected function generateChart(array $calendarRows, $apiKey, $houseNumber): void - { - usort($calendarRows, function (array $left, array $right): int { - return strcmp((string) ($left['date'] ?? ''), (string) ($right['date'] ?? '')); - }); - - $item = null; - $itemStatus = null; - $lastDate = null; - - foreach ($calendarRows as $row) { - if (!isset($row['date'])) { - continue; - } - - $currentDate = new \DateTimeImmutable($row['date']); - $currentStatus = $this->normalizeStatus((string) ($row['status'] ?? 'OK')); - - if (null !== $lastDate && $currentDate > $lastDate->add(new \DateInterval('P1D'))) { - if (null !== $item) { - $this->addItem($item, $this->translateStatusToGroupsSwissState($itemStatus), $apiKey, $houseNumber); - $item = null; - $itemStatus = null; - } - } - - if ('OK' === $currentStatus) { - if (null !== $item) { - $item['to'] = $lastDate; - $this->addItem($item, $this->translateStatusToGroupsSwissState($itemStatus), $apiKey, $houseNumber); - $item = null; - $itemStatus = null; - } - $lastDate = $currentDate; - continue; - } - - if (null === $item) { - $item = [ - 'from' => $currentDate, - 'to' => $currentDate, - ]; - $itemStatus = $currentStatus; - } elseif ($itemStatus !== $currentStatus) { - $item['to'] = $lastDate; - $this->addItem($item, $this->translateStatusToGroupsSwissState($itemStatus), $apiKey, $houseNumber); - $item = [ - 'from' => $currentDate, - 'to' => $currentDate, - ]; - $itemStatus = $currentStatus; - } else { - $item['to'] = $currentDate; - } - - $lastDate = $currentDate; - } - - if (null !== $item) { - $item['to'] = $lastDate; - $this->addItem($item, $this->translateStatusToGroupsSwissState($itemStatus), $apiKey, $houseNumber); - } - } - - /** - * @param array $item - * @param int $status - * @param string $apiKey - * @param int $houseNumber - */ - protected function addItem(array $item, $status, $apiKey, $houseNumber): void - { - $from = $item['from']->format('Y-m-d'); - $to = $item['to']->format('Y-m-d'); - - $this->logger->info(sprintf( - 'Adding status %d in %s-%s for %s', - $status, - $from, - $to, - $houseNumber - )); - - try { - $response = $this - ->httpClient - ->request('GET', 'https://www.groups.swiss/api/1.0/json.php', [ - 'query' => [ - 'apiKey' => $apiKey, - 'method' => 'setAvailabilityChart', - 'house' => $houseNumber, - 'from' => $from, - 'till' => $to, - 'state' => $status, - ], - ]) - ; - $this->logger->info($response->getContent()); - } catch (TransportExceptionInterface $e) { - $this->logger->error(sprintf('A problem occured: %s', $e->getMessage())); - } - } - - /** - * @param string $status - * @return string - */ - protected function normalizeStatus(string $status): string - { - $status = strtoupper(trim($status)); - if ('ONREQUEST' === $status) { - return 'ON_REQUEST'; - } - - if (in_array($status, [ 'OK', 'ON_REQUEST', 'BLOCKED' ], true)) { - return $status; - } - - return 'OK'; - } - - /** - * @param string $status - * @return int - */ - protected function translateStatusToGroupsSwissState(string $status): int - { - $status = $this->normalizeStatus($status); - - if ('ON_REQUEST' === $status) { - return 1; - } - - if ('BLOCKED' === $status) { - return 2; - } - - return 0; - } -} diff --git a/packages/ep_products/Classes/Service/IcalService.php b/packages/ep_products/Classes/Service/IcalService.php deleted file mode 100644 index 324f195..0000000 --- a/packages/ep_products/Classes/Service/IcalService.php +++ /dev/null @@ -1,159 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\BpnConnect\ApiClient; -use EP\EpProducts\Domain\Model\Hotel; -use Kigkonsult\Icalcreator\Vcalendar; -use TYPO3\CMS\Core\SingletonInterface; - -class IcalService implements SingletonInterface -{ - private const SUMMARY_UNAVAILABLE = 'Unavailable'; - - /** - * @var ApiClient - */ - protected $apiClient; - - /** - * @var Vcalendar - */ - protected $vcalendar; - - /** - * @param ApiClient $apiClient - */ - public function __construct(ApiClient $apiClient) - { - $this->apiClient = $apiClient; - } - - /** - * @param Hotel $hotel - * @return string - */ - public function createContingentsFeed(Hotel $hotel): string - { - $calendarRows = []; - $hotelCode = trim((string) $hotel->getCode()); - - if ($hotelCode !== '') { - $dateFrom = new \DateTimeImmutable('today'); - - try { - $calendar = $this->apiClient->getCalendar( - $hotelCode, - $dateFrom, - null, - ApiClient::CALENDAR_MODE_RANGES - ); - $calendarRows = isset($calendar['data']) && is_array($calendar['data']) ? $calendar['data'] : []; - } catch (\Throwable $e) { - $calendarRows = []; - } - } - - $this->createCalendarInstance(); - $this->generateUnavailableItems($calendarRows); - - try { - return $this->vcalendar->vtimezonePopulate()->createCalendar(); - } catch (\Exception $e) { - return ''; - } - } - - /** - * @param array $calendarRows - */ - protected function generateUnavailableItems(array $calendarRows): void - { - usort($calendarRows, function (array $left, array $right): int { - return strcmp((string) ($left['date_from'] ?? ''), (string) ($right['date_from'] ?? '')); - }); - - foreach ($calendarRows as $row) { - if (!isset($row['date_from'], $row['date_to'])) { - continue; - } - - if (!$this->isUnavailableStatus($row['status'] ?? 'OK')) { - continue; - } - - $dateFrom = new \DateTimeImmutable($row['date_from']); - $dateTo = new \DateTimeImmutable($row['date_to']); - - if ($dateTo < $dateFrom) { - continue; - } - - $this->addBlockedItem([ - 'from' => $dateFrom, - 'to' => $dateTo->add(new \DateInterval('P1D')), - ]); - } - } - - /** - * @param array $item - */ - protected function addBlockedItem(array $item): void - { - try { - $this->vcalendar - ->newVevent() - ->setDtstart($item['from']) - ->setDtend($item['to']) - ->setSummary(self::SUMMARY_UNAVAILABLE) - ; - } catch (\Exception $e) { - } - } - - /** - * @param mixed $status - * @return bool - */ - protected function isUnavailableStatus($status): bool - { - $status = strtoupper(trim((string) $status)); - - return in_array($status, [ 'BLOCKED', 'ON_REQUEST', 'ONREQUEST' ], true); - } - - protected function createCalendarInstance(): void - { - $this->vcalendar = Vcalendar::factory([ Vcalendar::UNIQUE_ID => 'www.ep-reisen.de' ]); - $this->vcalendar->setXprop( - Vcalendar::X_WR_TIMEZONE, - 'Europe/Berlin' - ); - } -} diff --git a/packages/ep_products/Classes/Service/LocalImportSource.php b/packages/ep_products/Classes/Service/LocalImportSource.php deleted file mode 100644 index f37ffd0..0000000 --- a/packages/ep_products/Classes/Service/LocalImportSource.php +++ /dev/null @@ -1,56 +0,0 @@ -isNewImportAvailable()) { - return null; - } - - $path = GeneralUtility::getFileAbsFileName(self::XML_DIR); - $reader = new XmlProductReader( - $path, - GeneralUtility::makeInstance(LogManager::class)->getLogger(XmlProductReader::class) - ); - - return new ProductImport($reader, $reader->getSourceGeneratedAt(), $path); - } - - public function markImported(ProductImport $import): void - { - (new ImportTimestampService())->writeImportTimestamp(self::IMPORT_MARKER); - } - - public function isNewImportAvailable(): bool - { - $timestampService = new ImportTimestampService(); - - $uploadMarkerPath = GeneralUtility::getFileAbsFileName(self::UPLOAD_MARKER); - if ($uploadMarkerPath === '' || !is_file($uploadMarkerPath)) { - // No supplier marker at all: import whatever is in the folder (legacy behaviour). - return true; - } - - $uploadedAt = $timestampService->readImportTimestamp(self::UPLOAD_MARKER); - $lastImportedAt = $timestampService->readImportTimestamp(self::IMPORT_MARKER); - - return $uploadedAt === null || $lastImportedAt === null || $uploadedAt > $lastImportedAt; - } -} diff --git a/packages/ep_products/Classes/Service/LogService.php b/packages/ep_products/Classes/Service/LogService.php deleted file mode 100644 index 4e588ce..0000000 --- a/packages/ep_products/Classes/Service/LogService.php +++ /dev/null @@ -1,204 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Dto\FilterOptions; -use EP\EpProducts\Traits\DbConnectionTrait; -use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Core\SingletonInterface; - -class LogService implements SingletonInterface -{ - use DbConnectionTrait; - - /** - * @return array - * @throws \Doctrine\DBAL\DBALException - */ - public function dumpSearchLogEpreisen() - { - $qb = $this->getDbConnection()->createQueryBuilder(); - - $result = $qb - ->select('logs.data as data') - ->addSelectLiteral('DATE_FORMAT(FROM_UNIXTIME(logs.time_micro), "%d.%m.%Y, %H:%i Uhr") as date') - ->from('tx_epproducts_log', 'logs') - ->orderBy('time_micro') - ->execute() - ->fetchAll() - ; - - $csv = [ - [ - 'Datum/Uhrzeit', - 'Destinationstyp', - 'Destinationsname', - 'Konzept', - 'Preisbereich', - 'Personenzahl', - 'Startdatum', - 'Enddatum', - 'Seite', - 'Seiten ID', - ], - ]; - - $labels = $this->fetchEntityLabels(); - - foreach ($result as $row) - { - $data = json_decode(substr($row['data'], 2)); - $searchParams = $data->searchParams; - $priceRange = null; - if ($searchParams->priceRange) { - list ($priceFrom, $priceTo) = FilterOptions::$priceRangeOptions[$searchParams->priceRange]; - $priceRange = sprintf('%s - %s', $priceFrom, $priceTo); - } - $pageTitle = ''; - if ($searchParams->pageUid) { - $page = BackendUtility::getRecord('pages', $searchParams->pageUid); - $pageTitle = $page['title']; - } - $csv[] = [ - $row['date'], - $searchParams->destinationType, - $labels[$searchParams->destinationType][$searchParams->destinationUid], - $labels['concept'][$searchParams->conceptUid], - $priceRange, - $searchParams->pax, - $searchParams->dateFrom, - $searchParams->dateTo, - $pageTitle, - $searchParams->pageUid, - ]; - } - - return $csv; - } - - /** - * @return array - * @throws \Doctrine\DBAL\DBALException - */ - public function dumpSearchLogEpevents() - { - $qb = $this->getDbConnection()->createQueryBuilder(); - - $result = $qb - ->select('logs.data as data') - ->addSelectLiteral('DATE_FORMAT(FROM_UNIXTIME(logs.time_micro), "%d.%m.%Y, %H:%i Uhr") as date') - ->from('tx_epevents_log', 'logs') - ->orderBy('time_micro') - ->execute() - ->fetchAll() - ; - - $csv = [ - [ - 'Datum/Uhrzeit', - 'Suchbegriff', - 'Seite', - 'Seiten ID', - ], - ]; - - foreach ($result as $row) - { - $data = json_decode(substr($row['data'], 2)); - $pageTitle = ''; - if ($data->pageUid) { - $page = BackendUtility::getRecord('pages', $data->pageUid); - $pageTitle = $page['title']; - } - $csv[] = [ - $row['date'], - $data->search, - $pageTitle, - $data->pageUid, - ]; - } - - return $csv; - } - - /** - * @return array - * @throws \Doctrine\DBAL\DBALException - */ - private function fetchEntityLabels() - { - $labels = [ - 'country' => [], - 'region' => [], - ]; - - $qb = $this->getDbConnection()->createQueryBuilder(); - - $result = $qb - ->select('uid', 'name') - ->from('tx_epproducts_domain_model_country', 'c') - ->execute() - ->fetchAll() - ; - - foreach ($result as $row) - { - $labels['country'][$row['uid']] = $row['name']; - } - - $qb = $this->getDbConnection()->createQueryBuilder(); - - $result = $qb - ->select('uid', 'name') - ->from('tx_epproducts_domain_model_region') - ->execute() - ->fetchAll() - ; - - foreach ($result as $row) - { - $labels['region'][$row['uid']] = $row['name']; - } - - $qb = $this->getDbConnection()->createQueryBuilder(); - - $result = $qb - ->select('uid', 'name') - ->from('tx_epproducts_domain_model_concept') - ->execute() - ->fetchAll() - ; - - foreach ($result as $row) - { - $labels['concept'][$row['uid']] = $row['name']; - } - - return $labels; - } - -} diff --git a/packages/ep_products/Classes/Service/ProductImportSourceFactory.php b/packages/ep_products/Classes/Service/ProductImportSourceFactory.php deleted file mode 100644 index 432e4a5..0000000 --- a/packages/ep_products/Classes/Service/ProductImportSourceFactory.php +++ /dev/null @@ -1,41 +0,0 @@ -getMode(); - if ($mode === self::MODE_LOCAL) { - return GeneralUtility::makeInstance(LocalImportSource::class); - } - if ($mode === self::MODE_API) { - return GeneralUtility::makeInstance(ApiImportSource::class); - } - - return GeneralUtility::makeInstance(SftpImportSource::class); - } - - public function getMode(): string - { - $config = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('ep_products'); - $mode = strtolower(trim((string)(is_array($config) ? ($config['productImportSource'] ?? '') : ''))); - - return in_array($mode, [self::MODE_LOCAL, self::MODE_API], true) ? $mode : self::MODE_SFTP; - } -} diff --git a/packages/ep_products/Classes/Service/SftpImportException.php b/packages/ep_products/Classes/Service/SftpImportException.php deleted file mode 100644 index 3b6c51c..0000000 --- a/packages/ep_products/Classes/Service/SftpImportException.php +++ /dev/null @@ -1,7 +0,0 @@ -fetchIfNewer(); - if ($path === null) { - return null; - } - - $reader = new XmlProductReader($path, $this->logger); - - return new ProductImport($reader, $reader->getSourceGeneratedAt(), $path); - } - - /** - * {@see ProductImportSource::markImported()} — publish the download as the new - * change-detection baseline (only reached after a successful import), then - * refresh the display-only marker for the BE module and system-info toolbar. - */ - public function markImported(ProductImport $import): void - { - $this->commit((string)$import->getLocation()); - (new ImportTimestampService())->writeImportTimestamp(self::IMPORT_MARKER); - } - - /** - * {@see ProductImportSource::isNewImportAvailable()} — alias for {@see isRemoteNewer()}. - */ - public function isNewImportAvailable(): bool - { - return $this->isRemoteNewer(); - } - - /** - * Timestamp of the export currently offered on the remote server, or null when - * the marker is absent/unreadable/unparseable (supplier upload not finished). - */ - public function getRemoteUploadTimestamp(): ?\DateTime - { - $config = $this->buildConfig(); - $sftp = $this->connect($config); - try { - [, $markerBytes] = $this->readRemoteMarker($sftp, $config['remotePath']); - } finally { - $sftp->disconnect(); - } - - return $markerBytes !== null ? $this->parseMarkerTimestamp($markerBytes) : null; - } - - /** - * Timestamp of the export we last successfully imported (staged marker copy). - */ - public function getStagedImportedTimestamp(): ?\DateTime - { - $marker = $this->stagingBasePath() . '/' . self::PUBLISHED_DIR . '/' . self::MARKER_FILE; - if (!is_file($marker)) { - return null; - } - - return $this->parseMarkerTimestamp((string)file_get_contents($marker)); - } - - /** - * True when the remote export is newer than the last imported one (or nothing - * has been imported yet). False when there is nothing to do. - */ - public function isRemoteNewer(): bool - { - $remoteTs = $this->getRemoteUploadTimestamp(); - if ($remoteTs === null) { - return false; - } - - $stagedTs = $this->getStagedImportedTimestamp(); - - return $stagedTs === null || $remoteTs > $stagedTs; - } - - /** - * Freshness check + (only when newer) full download into a fresh temp dir. - * Returns the temp-dir path — NOT yet published. The caller runs - * DateImportService::import() against it and calls {@see commit()} on success. - * Returns null when the remote export is not newer / not ready. - * - * @throws SftpImportException on connect/auth/host-key/partial-transfer failure - */ - public function fetchIfNewer(): ?string - { - $this->cleanupStale(); - $config = $this->buildConfig(); - $sftp = $this->connect($config); - - try { - [$remoteDir, $markerBytes] = $this->readRemoteMarker($sftp, $config['remotePath']); - $remoteTs = $markerBytes !== null ? $this->parseMarkerTimestamp($markerBytes) : null; - - if ($remoteTs === null) { - $this->logWarning('remote upload marker missing or unparseable; skipping product import', [ - 'host' => $config['host'], - 'remotePath' => $config['remotePath'], - ]); - - return null; - } - - $stagedTs = $this->getStagedImportedTimestamp(); - if ($stagedTs !== null && $remoteTs <= $stagedTs) { - return null; - } - - return $this->downloadInto($sftp, $remoteDir, $markerBytes); - } finally { - $sftp->disconnect(); - } - } - - /** - * Unconditional download into a fresh temp dir. Returns the temp-dir path. - * - * @throws SftpImportException - */ - public function fetch(): string - { - $this->cleanupStale(); - $config = $this->buildConfig(); - $sftp = $this->connect($config); - - try { - [$remoteDir, $markerBytes] = $this->readRemoteMarker($sftp, $config['remotePath']); - if ($markerBytes === null) { - throw new SftpImportException( - 'Remote export has no readable ' . self::MARKER_FILE . ' under "' . $config['remotePath'] . '"' - ); - } - - return $this->downloadInto($sftp, $remoteDir, $markerBytes); - } finally { - $sftp->disconnect(); - } - } - - /** - * Publish a temp dir produced by {@see fetchIfNewer()} / {@see fetch()} to - * .../current, making its marker the new change-detection baseline. Call only - * after import() succeeded. - * - * @throws SftpImportException - */ - public function commit(string $stagedPath): string - { - $base = $this->stagingBasePath(); - $stagedPath = rtrim($stagedPath, '/'); - - if (strpos($stagedPath . '/', $base . '/') !== 0 || !is_dir($stagedPath)) { - throw new SftpImportException('Refusing to publish unknown staging directory: ' . $stagedPath); - } - - $published = $base . '/' . self::PUBLISHED_DIR; - - if (is_dir($published)) { - $retired = $published . '.old-' . time() . '-' . bin2hex(random_bytes(3)); - if (!@rename($published, $retired)) { - throw new SftpImportException('Cannot move previous import aside: ' . $published); - } - } - - if (!@rename($stagedPath, $published)) { - throw new SftpImportException('Cannot publish staging directory to ' . $published); - } - - foreach ((array)glob($base . '/' . self::PUBLISHED_DIR . '.old-*', GLOB_ONLYDIR) as $old) { - GeneralUtility::rmdir($old, true); - } - - return $published; - } - - /** - * @param array{host:string,port:int,user:string,password:string,remotePath:string,timeout:int,hostKey:string} $config - */ - private function connect(array $config): SFTP - { - try { - $sftp = new SFTP($config['host'], $config['port'], $config['timeout']); - } catch (\Throwable $e) { - throw new SftpImportException( - sprintf('Cannot connect to SFTP host %s:%d: %s', $config['host'], $config['port'], $e->getMessage()), - 0, - $e - ); - } - - if ($config['hostKey'] !== '') { - $this->verifyHostKey($sftp, $config['host'], $config['hostKey']); - } - - try { - $authenticated = $sftp->login($config['user'], $config['password']); - } catch (\Throwable $e) { - throw new SftpImportException( - sprintf('Cannot connect to SFTP host %s:%d: %s', $config['host'], $config['port'], $e->getMessage()), - 0, - $e - ); - } - - if ($authenticated !== true) { - throw new SftpImportException(sprintf('SFTP authentication failed for user "%s"', $config['user'])); - } - - return $sftp; - } - - private function verifyHostKey(SFTP $sftp, string $host, string $expected): void - { - try { - $actual = $sftp->getServerPublicHostKey(); - } catch (\Throwable $e) { - throw new SftpImportException('Cannot read SSH host key for ' . $host . ': ' . $e->getMessage(), 0, $e); - } - - if ($actual === false) { - throw new SftpImportException('Cannot read SSH host key for ' . $host); - } - - $expected = trim($expected); - $actual = trim($actual); - - if (hash_equals($actual, $expected)) { - return; - } - - $parts = explode(' ', $actual); - $rawKey = isset($parts[1]) ? base64_decode($parts[1], true) : false; - if ($rawKey !== false) { - $fingerprint = 'SHA256:' . rtrim(base64_encode(hash('sha256', $rawKey, true)), '='); - if (hash_equals($fingerprint, $expected)) { - return; - } - } - - throw new SftpImportException('SSH host key mismatch for ' . $host . ' — refusing to connect'); - } - - /** - * Reads the upload marker, probing each acceptable form of the configured - * remote directory. Some SFTP servers (e.g. Hetzner Storage Box) only accept - * paths relative to the login directory and silently fail on a leading slash. - * - * @return array{0:string,1:?string} the directory form that worked, and the marker bytes (null if none did) - */ - private function readRemoteMarker(SFTP $sftp, string $configuredPath): array - { - $candidates = $this->remoteDirCandidates($configuredPath); - - foreach ($candidates as $dir) { - try { - $contents = $sftp->get($this->joinRemote($dir, self::MARKER_FILE)); - } catch (\Throwable $e) { - throw new SftpImportException( - 'Failed to read remote ' . self::MARKER_FILE . ': ' . $e->getMessage(), - 0, - $e - ); - } - - if ($contents !== false) { - return [$dir, (string)$contents]; - } - } - - return [$candidates[0], null]; - } - - /** - * @return string[] non-empty, unique - */ - private function remoteDirCandidates(string $configuredPath): array - { - $configured = trim($configuredPath); - $relative = ltrim($configured, '/'); - - $candidates = []; - if ($configured !== '' && $configured !== '/') { - $candidates[] = $configured; - } - if ($relative !== '' && $relative !== $configured) { - $candidates[] = $relative; - } - $candidates[] = '.'; - - return array_values(array_unique($candidates)); - } - - /** - * Download Ziel_*.xml + zustiege.xml + uebertragung.info into a fresh temp dir, - * verifying each file's size against the remote listing. The marker is written - * last, from the bytes already fetched for the freshness check. - * - * @throws SftpImportException - */ - private function downloadInto(SFTP $sftp, string $remotePath, string $markerBytes): string - { - $list = $sftp->rawlist($remotePath, false); - if ($list === false) { - throw new SftpImportException('Cannot list remote directory ' . $remotePath); - } - - $productFiles = []; - $pickupSize = null; - foreach ($list as $name => $attrs) { - if ($name === '.' || $name === '..' || !is_array($attrs)) { - continue; - } - if ((int)($attrs['type'] ?? 0) === self::REMOTE_TYPE_DIRECTORY) { - continue; - } - if (strpos($name, self::PRODUCT_PREFIX) === 0 && substr($name, -4) === '.xml') { - $productFiles[$name] = (int)($attrs['size'] ?? -1); - } elseif ($name === self::PICKUPS_FILE) { - $pickupSize = (int)($attrs['size'] ?? -1); - } - } - - if (count($productFiles) === 0) { - throw new SftpImportException('Remote export contains no ' . self::PRODUCT_PREFIX . '_*.xml files'); - } - - $previousCount = $this->stagedProductFileCount(); - if ($previousCount > 0 && count($productFiles) < (int)floor($previousCount * 0.5)) { - throw new SftpImportException(sprintf( - 'Remote export looks truncated (%d %s_*.xml files vs %d previously) — refusing to import', - count($productFiles), - self::PRODUCT_PREFIX, - $previousCount - )); - } - - $toDownload = $productFiles; - if ($pickupSize !== null) { - $toDownload[self::PICKUPS_FILE] = $pickupSize; - } else { - $this->logWarning('remote export has no ' . self::PICKUPS_FILE . '; pickups will be skipped'); - } - - $tmp = $this->newTempDir(); - - foreach ($toDownload as $name => $expectedSize) { - $target = $tmp . '/' . $name; - try { - $ok = $sftp->get($this->joinRemote($remotePath, $name), $target); - } catch (\Throwable $e) { - GeneralUtility::rmdir($tmp, true); - throw new SftpImportException('Download failed for ' . $name . ': ' . $e->getMessage(), 0, $e); - } - - if ($ok === false || !is_file($target)) { - GeneralUtility::rmdir($tmp, true); - throw new SftpImportException('Download failed for ' . $name); - } - - clearstatcache(true, $target); - if ($expectedSize >= 0 && filesize($target) !== $expectedSize) { - $actualSize = filesize($target); - GeneralUtility::rmdir($tmp, true); - throw new SftpImportException(sprintf( - 'Size mismatch for %s (got %d bytes, expected %d)', - $name, - $actualSize, - $expectedSize - )); - } - } - - // Write the completion marker last, mirroring the supplier's upload order. - GeneralUtility::writeFile($tmp . '/' . self::MARKER_FILE, $markerBytes, false); - - return $tmp; - } - - private function stagedProductFileCount(): int - { - $dir = $this->stagingBasePath() . '/' . self::PUBLISHED_DIR; - if (!is_dir($dir)) { - return 0; - } - - $count = 0; - foreach ((array)scandir($dir) as $name) { - if (strpos((string)$name, self::PRODUCT_PREFIX) === 0 && substr((string)$name, -4) === '.xml') { - $count++; - } - } - - return $count; - } - - private function parseMarkerTimestamp(string $contents): ?\DateTime - { - $line = trim((string)strtok($contents, "\r\n")); - if ($line === '') { - return null; - } - - $date = \DateTime::createFromFormat(self::MARKER_TS_FORMAT, $line); - - return $date instanceof \DateTime ? $date : null; - } - - private function logWarning(string $message, array $context = []): void - { - if ($this->logger !== null) { - $this->logger->warning($message, $context); - } - } - - private function stagingBasePath(): string - { - return Environment::getVarPath() . '/transient/' . self::STAGING_SUBDIR; - } - - private function newTempDir(): string - { - $dir = $this->stagingBasePath() . '/.tmp-' . getmypid() . '-' . bin2hex(random_bytes(4)); - GeneralUtility::mkdir_deep($dir); - if (!is_dir($dir) || !is_writable($dir)) { - throw new SftpImportException('Cannot create staging directory: ' . $dir); - } - - return $dir; - } - - private function cleanupStale(): void - { - $base = $this->stagingBasePath(); - if (!is_dir($base)) { - return; - } - - $stale = array_merge( - (array)glob($base . '/.tmp-*', GLOB_ONLYDIR), - (array)glob($base . '/' . self::PUBLISHED_DIR . '.old-*', GLOB_ONLYDIR) - ); - foreach ($stale as $dir) { - GeneralUtility::rmdir($dir, true); - } - } - - private function joinRemote(string $base, string $name): string - { - return rtrim($base, '/') . '/' . ltrim($name, '/'); - } - - /** - * @return array{host:string,port:int,user:string,password:string,remotePath:string,timeout:int,hostKey:string} - */ - private function buildConfig(): array - { - if ($this->configuration === null) { - $raw = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('ep_products'); - $raw = is_array($raw) ? $raw : []; - - $host = trim((string)($raw['productImportSftpHost'] ?? '')); - $user = trim((string)($raw['productImportSftpUser'] ?? '')); - $password = (string)($raw['productImportSftpPassword'] ?? ''); - $remotePath = trim((string)($raw['productImportSftpRemotePath'] ?? '/')); - $port = (int)($raw['productImportSftpPort'] ?? 22); - $timeout = (int)($raw['productImportSftpTimeout'] ?? 15); - $hostKey = trim((string)($raw['productImportSftpHostKey'] ?? '')); - - if ($host === '' || $user === '') { - throw new SftpImportException( - 'SFTP product import is not configured: host and username are required ' - . '(Admin Tools → Settings → Extension Configuration → ep_products).' - ); - } - if ($password === '') { - throw new SftpImportException('SFTP product import is not configured: password is required.'); - } - - $this->configuration = [ - 'host' => $host, - 'port' => $port > 0 ? $port : 22, - 'user' => $user, - 'password' => $password, - 'remotePath' => $remotePath === '' ? '/' : $remotePath, - 'timeout' => $timeout > 0 ? $timeout : 15, - 'hostKey' => $hostKey, - ]; - } - - return $this->configuration; - } -} diff --git a/packages/ep_products/Classes/Service/SnowreportImportService.php b/packages/ep_products/Classes/Service/SnowreportImportService.php deleted file mode 100644 index 26ce048..0000000 --- a/packages/ep_products/Classes/Service/SnowreportImportService.php +++ /dev/null @@ -1,621 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Snowreport; -use EP\EpProducts\Domain\Model\Webcam; -use EP\EpProducts\Domain\Repository\RegionRepository; -use EP\EpProducts\Domain\Repository\SnowreportRepository; -use EP\EpProducts\Domain\Repository\WebcamRepository; -use EP\EpProducts\Utility\SettingsUtility; -use TYPO3\CMS\Core\Database\Connection; -use TYPO3\CMS\Core\Database\ConnectionPool; -use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction; -use TYPO3\CMS\Core\Http\RequestFactory; -use TYPO3\CMS\Core\SingletonInterface; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface; - -class SnowreportImportService implements SingletonInterface -{ - const XML_FILE_PATH = 'fileadmin/snowreport/snowreport.xml'; - const XML_FILE_URL = 'https://www.skiresort-service.com/xml-feed/'; - - /** - * Connection and read timeout for the feed download, in seconds. A healthy response to this - * endpoint arrives in well under a second, so the ceiling is kept low enough that an outage on - * the vendor side fails visibly instead of stalling the scheduler task or the backend request. - */ - const HTTP_CONNECT_TIMEOUT = 5; - const HTTP_TIMEOUT = 30; - - /** - * @var array - */ - protected $validSnowreportUids = []; - - /** - * @var array - */ - protected $validWebcamUids = []; - - /** - * Existing records keyed by vendor_uid, preloaded once per import to avoid a query per record. - * - * @var array - */ - protected $snowreportIndex = []; - - /** - * @var array - */ - protected $webcamIndex = []; - - /** - * @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager - */ - protected $persistenceManager; - - /** - * @var \EP\EpProducts\Domain\Repository\SnowreportRepository - */ - protected $snowreportRepository; - - /** - * @var \EP\EpProducts\Domain\Repository\WebcamRepository - */ - protected $webcamRepository; - - /** - * @var \EP\EpProducts\Domain\Repository\RegionRepository - */ - protected $regionRepository; - - /** - * @param PersistenceManagerInterface $persistenceManager - * @param SnowreportRepository $snowreportRepository - * @param WebcamRepository $webcamRepository - * @param RegionRepository $regionRepository - */ - public function __construct( - PersistenceManagerInterface $persistenceManager, - SnowreportRepository $snowreportRepository, - WebcamRepository $webcamRepository, - RegionRepository $regionRepository - ) { - $this->persistenceManager = $persistenceManager; - $this->snowreportRepository = $snowreportRepository; - $this->webcamRepository = $webcamRepository; - $this->regionRepository = $regionRepository; - } - - const TYPE_INT = 'int'; - const TYPE_STRING = 'string'; - const TYPE_BOOL = 'bool'; - const TYPE_DATE = 'date'; - - /** - * Declared schema of the vendor feed: XML element name => target column and its type. - * - * XML carries no type information - every element is a string - so the type of each field is - * declared here rather than guessed from the value. Values are converted strictly according to - * this table; anything unexpected is logged and falls back to the type's empty value instead of - * silently changing type. - * - * @var array - */ - protected static $map = [ - 'region_id' => ['column' => 'vendor_uid', 'type' => self::TYPE_INT], - 'region_name' => ['column' => 'region_name', 'type' => self::TYPE_STRING], - 'region_offen' => ['column' => 'opened', 'type' => self::TYPE_BOOL], - 'gletschergebiet' => ['column' => 'glacier', 'type' => self::TYPE_BOOL], - 'schneehoehe_berg' => ['column' => 'snow_level_mountain', 'type' => self::TYPE_INT], - 'schneehoehe_tal' => ['column' => 'snow_level_valley', 'type' => self::TYPE_INT], - 'schneequalitaet' => ['column' => 'snow_quality', 'type' => self::TYPE_STRING], - 'letzter_schneefall' => ['column' => 'last_snowfall', 'type' => self::TYPE_DATE], - 'lifte_gesamt' => ['column' => 'lifts_total', 'type' => self::TYPE_INT], - 'offene_lifte' => ['column' => 'lifts_opened', 'type' => self::TYPE_INT], - 'letzte_aktualisierung' => ['column' => 'last_update', 'type' => self::TYPE_DATE], - 'hoehemax' => ['column' => 'height_max', 'type' => self::TYPE_INT], - 'hoehemin' => ['column' => 'height_min', 'type' => self::TYPE_INT], - 'datum_saisonstart' => ['column' => 'season_start', 'type' => self::TYPE_DATE], - 'datum_saisonende' => ['column' => 'season_end', 'type' => self::TYPE_DATE], - ]; - - /** - * Accepted boolean representations, lowercased. - * - * @var array - */ - protected static $booleanMap = [ - 'true' => true, - '1' => true, - 'ja' => true, - 'yes' => true, - 'false' => false, - '0' => false, - 'nein' => false, - 'no' => false, - ]; - - /** - * Distinct conversion problems encountered during the current import. - * - * @var array - */ - protected $conversionWarnings = []; - - /** - * @return int - */ - public function importSnowReportData() - { - $count = 0; - $file = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH); - - if (!is_file($file)) { - $this->writelog(sprintf('Snowreport XML import failed: file "%s" does not exist.', $file)); - - return 0; - } - - try { - $xmlData = $this->parseReportsXml((string) file_get_contents($file)); - } catch (\RuntimeException $e) { - $this->writelog(sprintf('Snowreport XML import failed: %s', $e->getMessage())); - - return 0; - } - - $this->resetImportState(); - $this->buildIndexes(); - - $snowReportStoragePid = $this->getStoragePid(); - - foreach ($xmlData->schneemeldung as $reportXml) - { - $vendorUid = (int) $reportXml->region_id; - $snowreport = $this->getSnowreport($vendorUid); - - $row = []; - foreach (static::$map as $key => $field) - { - if (!isset($reportXml->{$key})) { - $this->addConversionWarning(sprintf('Element <%s> missing in feed.', $key)); - $row[$field['column']] = $this->getEmptyValue($field['type']); - continue; - } - - $row[$field['column']] = $this->convertValue((string) $reportXml->{$key}, $field['type'], $key); - } - - $snowreport->setPid($snowReportStoragePid); - $snowreport->setVendorUid($vendorUid); - $snowreport->setRegionName($row['region_name']); - $snowreport->setOpened($row['opened']); - $snowreport->setGlacier($row['glacier']); - $snowreport->setSnowLevelMountain($row['snow_level_mountain']); - $snowreport->setSnowLevelValley($row['snow_level_valley']); - $snowreport->setSnowQuality($row['snow_quality']); - $snowreport->setLastSnowfall($row['last_snowfall']); - $snowreport->setLiftsTotal($row['lifts_total']); - $snowreport->setLiftsOpened($row['lifts_opened']); - $snowreport->setLastUpdate($row['last_update']); - $snowreport->setHeightMax($row['height_max']); - $snowreport->setHeightMin($row['height_min']); - $snowreport->setSeasonStart($row['season_start']); - $snowreport->setSeasonEnd($row['season_end']); - - if ($reportXml->webcam) { - $this->importWebcamData($reportXml->webcam, $snowreport); - } - - // New objects are already registered via add(); only managed ones need update(). - if (!$snowreport->_isNew()) { - $this->snowreportRepository->update($snowreport); - } - - $this->validSnowreportUids[] = $vendorUid; - - $count++; - } - - $this->persistenceManager->persistAll(); - - $this->cleanupData('tx_epproducts_domain_model_webcam', $this->validWebcamUids); - $this->cleanupData('tx_epproducts_domain_model_snowreport', $this->validSnowreportUids); - $this->updateWebcamCounters(); - - $this->logConversionWarnings(); - $this->writelog(sprintf('Snowreport XML import successful (%d records).', $count)); - - return $count; - } - - /** - * @param \SimpleXMLElement $xml - * @param Snowreport $snowreport - */ - public function importWebcamData(\SimpleXMLElement $xml, Snowreport $snowreport) - { - $snowReportStoragePid = $this->getStoragePid(); - foreach ($xml->children() as $item) - { - $include = $this->convertValue((string) $item->aktuell, self::TYPE_BOOL, 'aktuell'); - $available = $this->convertValue((string) $item->verf, self::TYPE_BOOL, 'verf'); - $vendorUid = (int) $item->uid; - - $webcam = isset($this->webcamIndex[$vendorUid]) ? $this->webcamIndex[$vendorUid] : null; - - // Skip cams that are neither current nor already known - if (null === $webcam && false === $include) { - continue; - } - - // Add new cam if not in db yet - if (null === $webcam) { - $webcam = new Webcam(); - $webcam->setVendorUid($vendorUid); - $webcam->setPid($snowReportStoragePid); - $this->webcamRepository->add($webcam); - $this->webcamIndex[$vendorUid] = $webcam; - $snowreport->addWebcam($webcam); - } - - $webcam->setUrl((string) $item->url); - $webcam->setName((string) $item->dt); - $webcam->setAvailable($available && $include); - - $this->validWebcamUids[] = $vendorUid; - } - } - - /** - * Flags records that are no longer contained in the feed as deleted. - * - * @param string $table - * @param array $validUids - * @return int Number of records flagged - */ - public function cleanupData($table, array $validUids) - { - /** @var ConnectionPool $connectionPool */ - $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); - $qb = $connectionPool->getQueryBuilderForTable($table); - // Hidden records are still managed by the import, only deleted ones are out of scope. - $qb->getRestrictions() - ->removeAll() - ->add(GeneralUtility::makeInstance(DeletedRestriction::class)) - ; - $result = $qb - ->select('vendor_uid') - ->from($table) - ->execute() - ->fetchAllAssociative() - ; - - $currentUids = array_map(function ($row) { - return (int)$row['vendor_uid']; - }, $result); - - $obsoleteUids = array_values(array_diff($currentUids, $validUids)); - if (0 === count($obsoleteUids)) { - return 0; - } - - $qb = $connectionPool->getQueryBuilderForTable($table); - - return (int) $qb - ->update($table) - ->set('deleted', 1) - ->set('tstamp', isset($GLOBALS['EXEC_TIME']) ? $GLOBALS['EXEC_TIME'] : time()) - ->where( - $qb->expr()->in( - 'vendor_uid', - $qb->createNamedParameter($obsoleteUids, Connection::PARAM_INT_ARRAY) - ) - ) - ->execute() - ; - } - - /** - * Recalculates the inline child counter on the snowreport records. Webcams are flagged as deleted - * with plain SQL, which bypasses the counter Extbase maintains for the relation. - */ - protected function updateWebcamCounters() - { - $connection = GeneralUtility::makeInstance(ConnectionPool::class) - ->getConnectionForTable('tx_epproducts_domain_model_snowreport'); - - $connection->executeStatement( - 'UPDATE tx_epproducts_domain_model_snowreport s SET s.webcams = (' - . ' SELECT COUNT(*) FROM tx_epproducts_domain_model_webcam w' - . ' WHERE w.snowreport = s.uid AND w.deleted = 0' - . ')' - ); - } - - /** - * Downloads the feed and replaces the local file only if the response is a usable XML document. - * The existing file is left untouched on any failure. - * - * @return bool - */ - public function downloadReportsXml() - { - $path = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH); - - try { - $xmlContent = $this->fetchReportsXml(); - $this->parseReportsXml($xmlContent); - } catch (\Exception $e) { - $this->writelog(sprintf( - 'Snowreport XML download failed (%s). Keeping existing file.', - $e->getMessage() - )); - - return false; - } - - // Write to a temporary file first and move it into place, so the feed is either the old or the - // new document, never a partially written one. - $temporaryPath = $path . '.tmp'; - if (false === file_put_contents($temporaryPath, $xmlContent) || !rename($temporaryPath, $path)) { - @unlink($temporaryPath); - $this->writelog(sprintf('Snowreport XML could not be written to "%s".', $path)); - - return false; - } - - return true; - } - - /** - * @return string - * @throws \RuntimeException - */ - protected function fetchReportsXml() - { - /** @var RequestFactory $requestFactory */ - $requestFactory = GeneralUtility::makeInstance(RequestFactory::class); - - $response = $requestFactory->request(self::XML_FILE_URL, 'GET', [ - 'connect_timeout' => self::HTTP_CONNECT_TIMEOUT, - 'timeout' => self::HTTP_TIMEOUT, - 'headers' => [ - 'Accept' => 'application/xml, text/xml', - ], - ]); - - if (200 !== $response->getStatusCode()) { - throw new \RuntimeException( - sprintf('unexpected status code %d', $response->getStatusCode()), - 1758000001 - ); - } - - return (string) $response->getBody(); - } - - /** - * Parses the feed and rejects documents that are unusable. Without this an empty or truncated - * response would be imported as an empty feed, and the cleanup would flag every record as deleted. - * - * @param string $xmlContent - * @return \SimpleXMLElement - * @throws \RuntimeException - */ - protected function parseReportsXml($xmlContent) - { - if ('' === trim($xmlContent)) { - throw new \RuntimeException('response is empty', 1758000002); - } - - $useInternalErrors = libxml_use_internal_errors(true); - libxml_clear_errors(); - $xmlData = simplexml_load_string($xmlContent); - $errors = libxml_get_errors(); - libxml_clear_errors(); - libxml_use_internal_errors($useInternalErrors); - - if (false === $xmlData) { - $message = count($errors) > 0 ? trim($errors[0]->message) : 'unknown error'; - throw new \RuntimeException(sprintf('response is not valid XML (%s)', $message), 1758000003); - } - - if (0 === $xmlData->schneemeldung->count()) { - throw new \RuntimeException('response contains no elements', 1758000004); - } - - return $xmlData; - } - - /** - * Loads existing records once, keyed by vendor_uid. Replaces a repository lookup per feed record. - */ - protected function buildIndexes() - { - $this->snowreportIndex = []; - foreach ($this->snowreportRepository->findAll() as $snowreport) { - $this->snowreportIndex[(int) $snowreport->getVendorUid()] = $snowreport; - } - - $this->webcamIndex = []; - foreach ($this->webcamRepository->findAll() as $webcam) { - $this->webcamIndex[(int) $webcam->getVendorUid()] = $webcam; - } - } - - /** - * @param int $vendorUid - * @return Snowreport - */ - protected function getSnowreport($vendorUid) - { - if (isset($this->snowreportIndex[$vendorUid])) { - return $this->snowreportIndex[$vendorUid]; - } - - $snowreport = new Snowreport(); - $snowreport->setVendorUid($vendorUid); - $this->snowreportRepository->add($snowreport); - $this->snowreportIndex[$vendorUid] = $snowreport; - - return $snowreport; - } - - /** - * The service is a singleton, so per-import state must not survive into the next run. - */ - protected function resetImportState() - { - $this->validSnowreportUids = []; - $this->validWebcamUids = []; - $this->conversionWarnings = []; - } - - /** - * Converts a raw XML string to the declared type of the field. - * - * @param string $raw - * @param string $type - * @param string $key XML element name, for logging - * @return int|string|bool - */ - protected function convertValue($raw, $type, $key) - { - $raw = trim($raw); - - // The feed delivers empty elements for data that is not available yet (snow levels out of - // season, for example). That is expected, not an error. - if ($raw === '') { - return $this->getEmptyValue($type); - } - - switch ($type) { - case self::TYPE_STRING: - return $raw; - - case self::TYPE_INT: - if (!preg_match('/^-?\d+$/', $raw)) { - $this->addConversionWarning(sprintf('<%s> expected an integer, got "%s".', $key, $raw)); - - return 0; - } - - return (int) $raw; - - case self::TYPE_BOOL: - $normalized = strtolower($raw); - if (!array_key_exists($normalized, static::$booleanMap)) { - $this->addConversionWarning(sprintf('<%s> expected a boolean, got "%s".', $key, $raw)); - - return false; - } - - return static::$booleanMap[$normalized]; - - case self::TYPE_DATE: - if (!preg_match('/^\d{4}-\d{2}-\d{2}([ T]\d{2}:\d{2}(:\d{2})?)?$/', $raw)) { - $this->addConversionWarning(sprintf('<%s> expected a date, got "%s".', $key, $raw)); - - return 0; - } - - $date = new \DateTime($raw); - - return $date->getTimestamp(); - } - - throw new \InvalidArgumentException(sprintf('Unknown field type "%s" declared for <%s>.', $type, $key), 1758000000); - } - - /** - * @param string $type - * @return int|string|bool - */ - protected function getEmptyValue($type) - { - if ($type === self::TYPE_STRING) { - return ''; - } - if ($type === self::TYPE_BOOL) { - return false; - } - - return 0; - } - - /** - * @param string $message - */ - protected function addConversionWarning($message) - { - // Keyed to keep one entry per distinct problem instead of one per record. - $this->conversionWarnings[$message] = true; - } - - /** - * Writes a single summary entry to the log if the feed contained unexpected values. - */ - protected function logConversionWarnings() - { - if (0 === count($this->conversionWarnings)) { - return; - } - - $messages = array_keys($this->conversionWarnings); - $this->writelog(sprintf( - 'Snowreport XML import: %d unexpected value(s) in feed: %s', - count($messages), - implode(' | ', array_slice($messages, 0, 10)) - )); - - $this->conversionWarnings = []; - } - - /** - * The scheduler task and the backend module provide a backend user, the CLI command does not. - * - * @param string $message - */ - protected function writelog($message) - { - if (isset($GLOBALS['BE_USER']) && is_object($GLOBALS['BE_USER'])) { - $GLOBALS['BE_USER']->writelog(4, 0, 0, 0, $message, []); - } - } - - public function getStoragePid() - { - $settingsUtility = new SettingsUtility(); - - return $settingsUtility->get('snowReportStoragePid'); - } -} diff --git a/packages/ep_products/Classes/Service/XmlProductReader.php b/packages/ep_products/Classes/Service/XmlProductReader.php deleted file mode 100644 index 1832bba..0000000 --- a/packages/ep_products/Classes/Service/XmlProductReader.php +++ /dev/null @@ -1,369 +0,0 @@ -path = rtrim($path, '/'); - $this->logger = $logger ?? new NullLogger(); - $this->timezone = new \DateTimeZone(self::TIMEZONE); - $this->wallClock = new \DateTimeZone('UTC'); - } - - public function getPath(): string - { - return $this->path; - } - - /** - * The export's own timestamp from uebertragung.info, or null if unreadable. - */ - public function getSourceGeneratedAt(): ?\DateTimeImmutable - { - $file = $this->path . '/' . self::MARKER_FILE; - if (!is_file($file)) { - return null; - } - - $line = trim((string) strtok((string) file_get_contents($file), "\r\n")); - $date = \DateTimeImmutable::createFromFormat(self::MARKER_TS_FORMAT, $line, $this->timezone); - - return $date ?: null; - } - - /** - * @return \Generator - */ - public function getIterator(): \Generator - { - if ($this->pickups === null) { - $this->pickups = $this->readPickups(); - } - - $folder = opendir($this->path); - if ($folder === false) { - $this->logger->error('product xml directory not readable', ['path' => $this->path]); - return; - } - - try { - while (($fileName = readdir($folder)) !== false) { - if (strpos($fileName, self::PRODUCT_PREFIX) === 0) { - yield from $this->readProductFile($this->path . '/' . $fileName); - } - } - } finally { - closedir($folder); - } - } - - private function readProductFile(string $file): \Generator - { - libxml_use_internal_errors(true); - $xmlData = simplexml_load_string((string) file_get_contents($file)); - if ($xmlData === false) { - libxml_clear_errors(); - $this->logger->error('product xml invalid', ['file' => $file]); - return; - } - - $xmlProduct = $xmlData->reise[0]; - if ($xmlProduct === null) { - return; - } - - $product = [ - 'code' => (string) $xmlProduct['code'], - 'busProId' => (int) $xmlProduct['idbuspro'], - ]; - - foreach ($xmlProduct->termin as $xmlDate) { - $from = $this->parseDate((string) $xmlDate['termin']); - $to = $this->parseDate((string) $xmlDate['bis']); - if ($from === null || $to === null) { - $this->logger->warning('travel date skipped, dates unparseable', [ - 'code' => (string) $xmlDate['code'], - 'termin' => (string) $xmlDate['termin'], - 'bis' => (string) $xmlDate['bis'], - ]); - continue; - } - - $date = [ - 'code' => (string) $xmlDate['code'], - 'busProId' => (int) $xmlDate['idbuspro'], - 'from' => $from->format('Y-m-d'), - 'to' => $to->format('Y-m-d'), - 'type' => (string) $xmlDate['reiseart'], - ]; - - // Everything below is per travel date and shared by its hotels. - $selectionGroups = $this->readSelectionGroups($xmlDate); - $transportServices = $this->readServices($xmlDate, 'lei_befoerderung'); - $dateServices = $this->readServices($xmlDate, 'lei_sonstiges'); - $pickups = $this->readDatePickups($xmlDate, $from); - $guide = $this->readGuide($xmlDate); - - foreach ($xmlDate->hotel as $xmlHotel) { - [$pseudoPrice, $rooms] = $this->readRooms($xmlHotel); - - yield [ - 'product' => $product, - 'date' => $date, - 'hotel' => [ - 'code' => (string) $xmlHotel['code'], - 'busProId' => (int) $xmlHotel['idbuspro'], - ], - 'pseudoPrice' => $pseudoPrice, - 'selectionGroups' => $selectionGroups, - 'transportServices' => $transportServices, - 'dateServices' => $dateServices, - 'hotelServices' => $this->readServices($xmlHotel, 'lei_sonstiges'), - 'rooms' => $rooms, - 'pickups' => $pickups, - 'guide' => $guide, - ]; - } - } - } - - private function readSelectionGroups(\SimpleXMLElement $xmlDate): array - { - $groups = []; - foreach ($xmlDate->selektiongruppe as $xmlGroup) { - $selections = []; - foreach ($xmlGroup->selektion as $xmlSelection) { - $selections[] = [ - 'busProId' => (int) $xmlSelection['idbuspro'], - 'label' => (string) $xmlSelection['bezeichnung'], - ]; - } - $groups[] = [ - 'busProId' => (int) $xmlGroup['idbuspro'], - 'label' => (string) $xmlGroup['bezeichnung'], - 'selections' => $selections, - ]; - } - - return $groups; - } - - private function readServices(\SimpleXMLElement $xmlParent, string $list): array - { - $services = []; - foreach ($xmlParent->xpath($list . '/leistung') as $xmlService) { - $direction = trim((string) $xmlService->richtung); - $services[] = [ - 'busProId' => (int) $xmlService['idbuspro'], - 'subType' => (string) $xmlService['unterart'], - 'label' => $this->normalizeWhitespace((string) $xmlService->text), - 'price' => $this->parsePrice((string) $xmlService->preis), - 'status' => (string) $xmlService->status, - 'direction' => $direction === '' ? null : $direction, - ]; - } - - return $services; - } - - /** - * @return array{0: ?float, 1: array} - */ - private function readRooms(\SimpleXMLElement $xmlHotel): array - { - $pseudoPrice = null; - $rooms = []; - foreach ($xmlHotel->xpath('zimmer/preis') as $xmlRoom) { - $code = trim((string) $xmlRoom['zimmercode']); - if ($code === self::CODE_PSEUDOPRICE) { - $pseudoPrice = $this->parsePrice((string) $xmlRoom['preis']); - continue; - } - - $rooms[] = [ - 'busProId' => (int) $xmlRoom['idbuspro_zimmer'], - 'code' => $code, - 'label' => (string) $xmlRoom['zimmertext'], - 'category' => (string) $xmlRoom['kat'], - 'minPax' => $this->parseInt((string) $xmlRoom['MinPax']), - 'maxPax' => $this->parseInt((string) $xmlRoom['MaxPax']), - 'nights' => $this->parseInt((string) $xmlRoom['naechte']), - 'price' => $this->parsePrice((string) $xmlRoom['preis']), - 'available' => $this->parseInt((string) $xmlRoom['verfuegbar']), - 'status' => (string) $xmlRoom['status'], - 'boardCode' => (string) $xmlRoom['vpcode'], - 'boardBusProId' => $this->parseInt((string) $xmlRoom['idbuspro_vp']), - ]; - } - - return [$pseudoPrice, $rooms]; - } - - /** - * A bare HH:mm takes the travel date's start, and is rolled onto the next - * day when it would otherwise fall before the latest full date-time listed - * before it: a coach does not board backwards. The result is the local - * date and time as BusPro states it, without an offset. - */ - private function readDatePickups(\SimpleXMLElement $xmlDate, \DateTimeImmutable $from): array - { - $pickups = []; - $latest = null; - foreach ($xmlDate->xpath('zustiege/zustieg') as $xmlPickup) { - $busProId = (int) $xmlPickup['idbuspro']; - $time = trim((string) $xmlPickup['zeit']); - - $datetime = null; - if ($time !== '' && strpos($time, ' ') !== false) { - $datetime = \DateTimeImmutable::createFromFormat('!d.m.Y H:i:s', $time, $this->wallClock) ?: null; - if ($datetime !== null && ($latest === null || $datetime > $latest)) { - $latest = $datetime; - } - } elseif ($time !== '') { - $datetime = \DateTimeImmutable::createFromFormat('!Y-m-d H:i', $from->format('Y-m-d') . ' ' . $time, $this->wallClock) ?: null; - if ($datetime !== null && $latest !== null && $datetime < $latest) { - $datetime = $datetime->modify('+1 day'); - } - } - - $masterData = $this->pickups[$busProId] ?? null; - $pickups[] = [ - 'busProId' => $busProId, - 'code' => $masterData['code'] ?? null, - 'city' => $masterData['city'] ?? null, - 'street' => $masterData['street'] ?? null, - 'price' => $this->parsePrice((string) $xmlPickup['preis']), - 'datetime' => $datetime !== null ? $datetime->format(self::LOCAL_DATETIME_FORMAT) : null, - ]; - } - - return $pickups; - } - - private function readGuide(\SimpleXMLElement $xmlDate): ?array - { - foreach ($xmlDate->xpath('lei_befoerderung/leistung[@unterart="BUS"]') as $xmlService) { - if ((string) $xmlService->richtung === 'RUECK') { - continue; - } - if (!isset($xmlService->zustiegsplanung->reiseleiter)) { - continue; - } - - return [ - 'name' => (string) $xmlService->zustiegsplanung->reiseleiter->name, - 'phone' => (string) $xmlService->zustiegsplanung->reiseleiter->telefon, - ]; - } - - return null; - } - - /** - * @return array - */ - private function readPickups(): array - { - $file = $this->path . '/' . self::PICKUPS_FILE; - libxml_use_internal_errors(true); - if (!is_file($file) || !$xmlData = simplexml_load_string((string) file_get_contents($file))) { - libxml_clear_errors(); - $this->logger->warning('pickup xml missing or invalid', ['file' => $file]); - return []; - } - - $pickups = []; - foreach ($xmlData->zustieg as $xmlPickup) { - $pickups[(int) $xmlPickup['idbuspro']] = [ - 'code' => (string) $xmlPickup['code'], - 'city' => $this->normalizeWhitespace((string) $xmlPickup->ort), - 'street' => $this->normalizeWhitespace((string) $xmlPickup->strasse), - ]; - } - - return $pickups; - } - - private function normalizeWhitespace(string $value): string - { - return trim((string) preg_replace('/\s+/u', ' ', $value)); - } - - private function parseDate(string $value): ?\DateTimeImmutable - { - $date = \DateTimeImmutable::createFromFormat('!d.m.Y', trim($value), $this->timezone); - - return $date ?: null; - } - - /** - * German format with an optional thousands separator: "1.234,50" is 1234.5. - */ - private function parsePrice(string $value): ?float - { - $value = str_replace(['.', ','], ['', '.'], trim($value)); - - return is_numeric($value) ? (float) $value : null; - } - - private function parseInt(string $value): ?int - { - $value = trim($value); - - return is_numeric($value) ? (int) $value : null; - } -} diff --git a/packages/ep_products/Classes/Task/ImportContingentsTask.php b/packages/ep_products/Classes/Task/ImportContingentsTask.php deleted file mode 100644 index b9aeaa2..0000000 --- a/packages/ep_products/Classes/Task/ImportContingentsTask.php +++ /dev/null @@ -1,49 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\ContingentImportService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; -use TYPO3\CMS\Scheduler\Task\AbstractTask; - -class ImportContingentsTask extends AbstractTask -{ - public function execute() - { - /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - /** @var \EP\EpProducts\Service\ContingentImportService $importService */ - $importService = $objectManager->get(ContingentImportService::class); - if ($importService->isImportRequired()) { - $importService->import(); - } - - return true; - } -} diff --git a/packages/ep_products/Classes/Task/ImportDatesTask.php b/packages/ep_products/Classes/Task/ImportDatesTask.php deleted file mode 100644 index d1edeb9..0000000 --- a/packages/ep_products/Classes/Task/ImportDatesTask.php +++ /dev/null @@ -1,74 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\DateImportService; -use EP\EpProducts\Service\ProductImportSourceFactory; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Configuration\ConfigurationManager; -use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; -use TYPO3\CMS\Extbase\Service\CacheService; -use TYPO3\CMS\Scheduler\Task\AbstractTask; - -class ImportDatesTask extends AbstractTask -{ - public function execute(): bool - { - $importService = GeneralUtility::makeInstance(DateImportService::class); - $importSource = GeneralUtility::makeInstance(ProductImportSourceFactory::class)->get(); - $cacheService = GeneralUtility::makeInstance(CacheService::class); - - // Acquire the export only when it is newer than the one we last imported - // (SFTP mode: download to a staging dir; local mode: fileadmin/xmlexport; - // API mode: walk the MyE&P export pages). An acquisition failure is left - // to propagate so the scheduler marks the task failed. - $import = $importSource->acquire(); - - if ($import !== null) { - $importService->import($import->getRows()); - // Advance the "last imported" bookkeeping only after a successful - // import, so a crashed import retries on the next run. - $importSource->markImported($import); - } - - $settings = $this->getSettings(); - $travelInfoPageUid = $settings['travelInfoPageUid']; - $cacheService->clearPageCache($travelInfoPageUid); - - return true; - } - - protected function getSettings(): array - { - $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class); - $settings = $configurationManager - ->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); - - return $settings['plugin.']['tx_epproducts.']['settings.']; - } -} diff --git a/packages/ep_products/Classes/Task/ImportSnowreportTask.php b/packages/ep_products/Classes/Task/ImportSnowreportTask.php deleted file mode 100644 index ea8dcda..0000000 --- a/packages/ep_products/Classes/Task/ImportSnowreportTask.php +++ /dev/null @@ -1,46 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Service\SnowreportImportService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; -use TYPO3\CMS\Scheduler\Task\AbstractTask; - -class ImportSnowreportTask extends AbstractTask -{ - public function execute() - { - /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $snowreportService = $objectManager->get(SnowreportImportService::class); - $snowreportService->downloadReportsXml(); - $snowreportService->importSnowReportData(); - return true; - } -} diff --git a/packages/ep_products/Classes/Updates/TeamSlugUpdater.php b/packages/ep_products/Classes/Updates/TeamSlugUpdater.php deleted file mode 100644 index 5f1d8e0..0000000 --- a/packages/ep_products/Classes/Updates/TeamSlugUpdater.php +++ /dev/null @@ -1,121 +0,0 @@ -countRequiredUpdates(); - - return (bool)$elementCount; - } - - /** - * @return bool - */ - public function executeUpdate(): bool - { - $queryBuilder = $this->getQueryBuilder(); - - $statement = $queryBuilder->select('uid', 'name') - ->from('tx_epproducts_domain_model_teammember') - ->where( - $queryBuilder->expr()->orX( - $queryBuilder->expr()->eq( - 'path_segment', - $queryBuilder->createNamedParameter('') - ), - $queryBuilder->expr()->isNull('path_segment') - ) - ) - ->execute(); - while ($record = $statement->fetch()) { - $slug = Transliterator::urlize($record['name']); - $queryBuilder = $this->getQueryBuilder(); - $queryBuilder->update('tx_epproducts_domain_model_teammember') - ->where( - $queryBuilder->expr()->eq( - 'uid', - $queryBuilder->createNamedParameter($record['uid'], \PDO::PARAM_INT) - ) - ) - ->set('path_segment', $slug); - $queryBuilder->execute(); - } - - return true; - } - - protected function countRequiredUpdates(): int - { - $queryBuilder = $this->getQueryBuilder(); - - return $queryBuilder->count('uid') - ->from('tx_epproducts_domain_model_teammember') - ->where( - $queryBuilder->expr()->orX( - $queryBuilder->expr()->eq( - 'path_segment', - $queryBuilder->createNamedParameter('') - ), - $queryBuilder->expr()->isNull('path_segment') - ) - ) - ->execute()->fetchColumn(); - } - - protected function getQueryBuilder(): QueryBuilder - { - /** @var QueryBuilder $queryBuilder */ - $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) - ->getQueryBuilderForTable('tx_epproducts_domain_model_teammember'); - $queryBuilder->getRestrictions()->removeAll(); - - return $queryBuilder; - } - - /** - * @return string[] - */ - public function getPrerequisites(): array - { - return [ - DatabaseUpdatedPrerequisite::class, - ]; - } -} diff --git a/packages/ep_products/Configuration/Commands.php b/packages/ep_products/Configuration/Commands.php index 96c1984..48b96d3 100644 --- a/packages/ep_products/Configuration/Commands.php +++ b/packages/ep_products/Configuration/Commands.php @@ -1,15 +1,7 @@ [ - 'class' => \EP\EpProducts\Command\ExportCommandController::class, - 'scheduleable' => false, - ], - 'ep:groups-swiss' => [ - 'class' => \EP\EpProducts\Command\GroupsSwissCommand::class, - ], - 'ep:contingent-import' => [ - 'class' => \EP\EpProducts\Command\ContingentCommand::class, - 'scheduleable' => false, + 'ep:import-dates' => [ + 'class' => \EP\EpProducts\Command\DateCommandController::class, ], ]; diff --git a/packages/ep_products/Configuration/FlexForms/flexform_city_detail.xml b/packages/ep_products/Configuration/FlexForms/flexform_city_detail.xml deleted file mode 100644 index 0541cd5..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_city_detail.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_city - AND tx_epproducts_domain_model_city.hidden = 0 AND tx_epproducts_domain_model_city.deleted = 0 ORDER BY tx_epproducts_domain_model_city.name - 1 - 1 - - - - - - 0 - - - check - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_city_teaser.xml b/packages/ep_products/Configuration/FlexForms/flexform_city_teaser.xml deleted file mode 100644 index a98c0d9..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_city_teaser.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_country - ORDER BY name - - - - 0 - - - 0 - 1 - - - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_region - ORDER BY name - - - - 0 - - - 0 - 1 - - - - - - 0 - - - select - selectSingle - - - Winter - w - - - Sommer - s - - - 1 - 1 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_concept_detail.xml b/packages/ep_products/Configuration/FlexForms/flexform_concept_detail.xml deleted file mode 100644 index cf5461c..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_concept_detail.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_concept - AND tx_epproducts_domain_model_concept.hidden = 0 AND tx_epproducts_domain_model_concept.deleted = 0 ORDER BY tx_epproducts_domain_model_concept.name - - - Alle - 0 - - - 1 - 1 - - - - - - - - select - selectSingleBox - tx_epproducts_domain_model_concept - AND tx_epproducts_domain_model_concept.hidden = 0 AND tx_epproducts_domain_model_concept.deleted = 0 ORDER BY tx_epproducts_domain_model_concept.name - 5 - 0 - 10 - - - - - - 0 - - - check - - - - - - 0 - - - check - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_country.xml b/packages/ep_products/Configuration/FlexForms/flexform_country.xml deleted file mode 100644 index 4b21262..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_country.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_country - AND tx_epproducts_domain_model_country.hidden = 0 AND tx_epproducts_domain_model_country.deleted = 0 ORDER BY tx_epproducts_domain_model_country.name - - - - 0 - - - 0 - 1 - - - - - - 0 - - - check - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_faq.xml b/packages/ep_products/Configuration/FlexForms/flexform_faq.xml deleted file mode 100644 index cb9d809..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_faq.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectMultipleSideBySide - tx_epproducts_domain_model_faq - AND tx_epproducts_domain_model_faq.hidden = 0 AND tx_epproducts_domain_model_faq.deleted = 0 ORDER BY tx_epproducts_domain_model_faq.label - 1 - 50 - 10 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_hotel_detail.xml b/packages/ep_products/Configuration/FlexForms/flexform_hotel_detail.xml deleted file mode 100644 index 7dd6304..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_hotel_detail.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 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 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_hotel_detail_event.xml b/packages/ep_products/Configuration/FlexForms/flexform_hotel_detail_event.xml deleted file mode 100644 index 5a6878f..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_hotel_detail_event.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - 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_hotel_teaser.xml b/packages/ep_products/Configuration/FlexForms/flexform_hotel_teaser.xml deleted file mode 100644 index 62e436d..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_hotel_teaser.xml +++ /dev/null @@ -1,217 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - - - vierspaltig - 4 - - - dreispaltig - 3 - - - zweispaltig - 2 - - - 1 - 1 - - - - - - 0 - - FIELD:settings.productUid:REQ:FALSE - - select - selectSingle - tx_epproducts_domain_model_country - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - 0 - - FIELD:settings.productUid:REQ:FALSE - - select - selectSingle - tx_epproducts_domain_model_region - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - 0 - - FIELD:settings.productUid:REQ:FALSE - - select - selectSingle - tx_epproducts_domain_model_city - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - - FIELD:settings.productUid:REQ:FALSE - - select - selectSingle - tx_epproducts_domain_model_concept - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - - reload - - select - selectSingle - tx_epproducts_domain_model_product - ORDER BY name_internal - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - - FIELD:settings.productUid:REQ:TRUE - - select - selectSingle - - - Alle - 0 - - - Standard - 1 - - - Basic - 5 - - - Komfort - 2 - - - Deluxe - 3 - - - Superdeluxe - 4 - - - 0 - 1 - - - - - - - - select - selectCheckBox - - - Ferienwohnung - 1 - - - Sportclub - 2 - - - Apartment - 3 - - - Gästerhaus - 4 - - - Pension - 5 - - - 0 - 10 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_hotel_teaser_date_independent.xml b/packages/ep_products/Configuration/FlexForms/flexform_hotel_teaser_date_independent.xml deleted file mode 100644 index 47dfae6..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_hotel_teaser_date_independent.xml +++ /dev/null @@ -1,176 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - - - vierspaltig - 4 - - - dreispaltig - 3 - - - zweispaltig - 2 - - - 1 - 1 - - - - - - 0 - - FIELD:settings.productUid:REQ:FALSE - - select - selectSingle - tx_epproducts_domain_model_country - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - 0 - - FIELD:settings.productUid:REQ:FALSE - - select - selectSingle - tx_epproducts_domain_model_region - ORDER BY name - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - - reload - - select - selectSingle - tx_epproducts_domain_model_product - ORDER BY name_internal - - - Keine Zuordnung - 0 - - - 0 - 1 - - - - - - - FIELD:settings.productUid:REQ:TRUE - - select - selectSingle - - - Alle - 0 - - - Standard - 1 - - - Basic - 5 - - - Komfort - 2 - - - Deluxe - 3 - - - Superdeluxe - 4 - - - 0 - 1 - - - - - - - - select - selectCheckBox - - - Ferienwohnung - 1 - - - Sportclub - 2 - - - Apartment - 3 - - - Gästerhaus - 4 - - - Pension - 5 - - - 0 - 10 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_maps.xml b/packages/ep_products/Configuration/FlexForms/flexform_maps.xml deleted file mode 100644 index c973c2e..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_maps.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectMultipleSideBySide - tx_epproducts_domain_model_hotel - AND tx_epproducts_domain_model_hotel.latitude != "" AND tx_epproducts_domain_model_hotel.longitude != "" ORDER BY name - 0 - 50 - 10 - - - - - - 0 - - - select - selectMultipleSideBySide - tx_epproducts_domain_model_product - AND tx_epproducts_domain_model_product.detail_page != 0 ORDER BY name_internal - 0 - 50 - 10 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_pricetable.xml b/packages/ep_products/Configuration/FlexForms/flexform_pricetable.xml deleted file mode 100644 index af6b5ae..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_pricetable.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - - reload - - select - selectSingle - Pricetable->event - - - Preistabelle Eventreise - Pricetable->event - - - - - - - - - - check - 0 - - - - - - - - input - trim - - - - - - - - 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 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_region_detail.xml b/packages/ep_products/Configuration/FlexForms/flexform_region_detail.xml deleted file mode 100644 index f0f3602..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_region_detail.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_region - AND tx_epproducts_domain_model_region.hidden = 0 AND tx_epproducts_domain_model_region.deleted = 0 ORDER BY tx_epproducts_domain_model_region.name - 1 - 1 - - - - - - 0 - - - select - selectMultipleSideBySide - tx_epproducts_domain_model_region - AND tx_epproducts_domain_model_region.hidden = 0 AND tx_epproducts_domain_model_region.deleted = 0 ORDER BY tx_epproducts_domain_model_region.name - 0 - 5 - - - - - - 0 - - - check - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_region_teaser.xml b/packages/ep_products/Configuration/FlexForms/flexform_region_teaser.xml deleted file mode 100644 index 69dd942..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_region_teaser.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectSingle - tx_epproducts_domain_model_country - ORDER BY name - 1 - 1 - - - - - - 0 - - - select - selectSingle - - - Winter - w - - - Sommer - s - - - 1 - 1 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_snowreport.xml b/packages/ep_products/Configuration/FlexForms/flexform_snowreport.xml deleted file mode 100644 index 6e865c8..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_snowreport.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - select - selectMultipleSideBySide - tx_epproducts_domain_model_region - AND tx_epproducts_domain_model_region.snowreport > 0 ORDER BY name - 0 - 99 - 10 - - - - - - - - diff --git a/packages/ep_products/Configuration/FlexForms/flexform_teammembers.xml b/packages/ep_products/Configuration/FlexForms/flexform_teammembers.xml deleted file mode 100644 index cd68655..0000000 --- a/packages/ep_products/Configuration/FlexForms/flexform_teammembers.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - - - 0 - - - input - 20 - required - - - - - - 0 - - - input - 20 - required - - - - - - 0 - - - select - selectMultipleSideBySide - 1 - sys_category - 0 - 99 - - - - - - - - diff --git a/packages/ep_products/Configuration/RequestMiddlewares.php b/packages/ep_products/Configuration/RequestMiddlewares.php index f8ec710..fcf9f13 100644 --- a/packages/ep_products/Configuration/RequestMiddlewares.php +++ b/packages/ep_products/Configuration/RequestMiddlewares.php @@ -2,15 +2,6 @@ return [ 'frontend' => [ - 'ep/staticsearch' => [ - 'target' => \EP\EpProducts\Middleware\StaticSearchParamsMiddleware::class, - 'before' => [ - 'typo3/cms-redirects/redirecthandler', - ], - 'after' => [ - 'typo3/cms-frontend/static-route-resolver', - ], - ], 'ep/productapi' => [ 'target' => \EP\EpProducts\Middleware\ApiMiddleware::class, 'before' => [ @@ -29,11 +20,5 @@ return [ 'typo3/cms-frontend/page-argument-validator', ], ], - 'ep/staging-environment' => [ - 'target' => \EP\EpProducts\Middleware\StagingEnvironmentMiddleware::class, - 'after' => [ - 'typo3/cms-frontend/authentication', - ], - ], ], ]; diff --git a/packages/ep_products/Configuration/Services.yaml b/packages/ep_products/Configuration/Services.yaml index 2d88679..75fc664 100644 --- a/packages/ep_products/Configuration/Services.yaml +++ b/packages/ep_products/Configuration/Services.yaml @@ -8,11 +8,8 @@ services: resource: '../Classes/*' exclude: '../Classes/Domain/Model/*' - EP\EpProducts\EventListener\SystemInformationToolbarListener: - tags: - - name: event.listener - identifier: 'epToolbarListener' - event: TYPO3\CMS\Backend\Backend\Event\SystemInformationToolbarCollectorEvent + EP\EpProducts\Service\ProductImportSource: + alias: EP\EpProducts\Service\ApiImportSource cache.ep_cache: class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface @@ -28,10 +25,6 @@ services: arguments: $cache: '@cache.ep_cache' - EP\EpProducts\Controller\AjaxCalendarController: - arguments: - $cache: '@cache.ep_cache' - EP\EpProducts\Service\MyEpImageService: arguments: $cache: '@cache.ep_cache' diff --git a/packages/ep_products/Configuration/TCA/Overrides/sys_domain.php b/packages/ep_products/Configuration/TCA/Overrides/sys_domain.php deleted file mode 100644 index ca778b0..0000000 --- a/packages/ep_products/Configuration/TCA/Overrides/sys_domain.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'label' => 'Vertragspartner', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'tx_epproducts_domain_model_reseller', - 'foreign_table_where' => 'ORDER BY title', - 'items' => [ - ['Keine Zuordnung', 0], - ], - 'minitems' => 0, - 'maxitems' => 1, - ], - ], - ]; - - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns( - 'sys_domain', - $temporaryColumns - ); - - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( - 'sys_domain', - 'tx_epproducts_reseller', - '', - 'before:redirectTo' - ); - -}); diff --git a/packages/ep_products/Configuration/TCA/Overrides/tt_content.php b/packages/ep_products/Configuration/TCA/Overrides/tt_content.php index a4ebb41..b7ad7ad 100644 --- a/packages/ep_products/Configuration/TCA/Overrides/tt_content.php +++ b/packages/ep_products/Configuration/TCA/Overrides/tt_content.php @@ -5,18 +5,6 @@ defined('TYPO3_MODE') or die(); call_user_func(function () { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'searchbar', - 'Suchschlitz' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'searchresult', - 'Suchergebnis' - ); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'EP.EpProducts', 'product_detail', @@ -35,132 +23,6 @@ call_user_func(function () { 'Buchungstabelle' ); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'country_detail', - 'Land' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'region_teasergroup', - 'Gebiet: Teaser' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'region_detail', - 'Gebiet: Details' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'city_teasergroup', - 'Ort: Teaser' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'city_detail', - 'Ort: Details' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'hotel_teasergroup', - 'Hotel: Teaser' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'hotel_teasergroup_nodate', - 'Hotel: Teaser (terminunabhängig)' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'hotel_detail', - 'Hotel: Details' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'hotel_detail_event', - 'Hotel: Details (Event)' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'concept_teasergroup', - 'Konzept: Teaser' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'concept_detail', - 'Konzept: Details' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'snowreport_list', - 'Schneehöhen' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'teammembers', - 'Team' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'faq', - 'FAQ' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'newsletter', - 'Newsletter' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'newsletter_subscription', - 'Newsletter-/RA-Registrierung' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'maps', - 'Übersichtskarte Hotels/Produkte' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'pricetable', - 'Preistabelle' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'reseller', - 'Vertriebspartner Export' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'watchlist', - 'Merkliste' - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( - 'EP.EpProducts', - 'travelinfo', - 'Reiseinformationen' - ); - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_product_detail'] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'epproducts_product_detail', 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_product_detail.xml' @@ -178,94 +40,4 @@ call_user_func(function () { 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_product_pricetable.xml' ); - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_country_detail'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_country_detail', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_country.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_region_teasergroup'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_region_teasergroup', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_region_teaser.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_region_detail'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_region_detail', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_region_detail.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_city_teasergroup'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_city_teasergroup', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_city_teaser.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_city_detail'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_city_detail', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_city_detail.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_hotel_teasergroup'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_hotel_teasergroup', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_hotel_teaser.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_hotel_teasergroup_nodate'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_hotel_teasergroup_nodate', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_hotel_teaser_date_independent.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_hotel_detail'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_hotel_detail', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_hotel_detail.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_hotel_detail_event'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_hotel_detail_event', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_hotel_detail_event.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_concept_detail'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_concept_detail', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_concept_detail.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_faq'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_faq', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_faq.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_maps'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_maps', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_maps.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_pricetable'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_pricetable', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_pricetable.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_snowreport_list'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_snowreport_list', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_snowreport.xml' - ); - - $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_teammembers'] = 'pi_flexform'; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - 'epproducts_teammembers', - 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_teammembers.xml' - ); - }); diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_staticsearchparams.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_staticsearchparams.php deleted file mode 100644 index cb1801c..0000000 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_staticsearchparams.php +++ /dev/null @@ -1,258 +0,0 @@ - [ - 'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_staticsearchparams', - 'label' => 'name', - 'prependAtCopy' => '[COPY %s]', - 'default_sortby' => 'ORDER BY name', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - 'versioningWS' => true, - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'name,path_segment', - 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', - ], - 'types' => [ - '1' => [ - 'showitem' => 'name, path_segment, country, region, concept, hotel, product, date_from, - date_to, hotel_types, bus, pax', - ], - ], - 'palettes' => [], - 'columns' => [ - - '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] - ], - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_epproducts_domain_model_staticsearchparams', - 'foreign_table_where' => 'AND tx_epproducts_domain_model_staticsearchparams.pid=###CURRENT_PID### AND tx_epproducts_domain_model_staticsearchparams.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], - - 'hidden' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - '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', - 'size' => 13, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'behaviour' => [ - 'allowLanguageSynchronization' => true, - ], - 'renderType' => 'inputDateTime', - ], - ], - - 'bus' => [ - 'exclude' => 0, - 'label' => 'Bus', - 'config' => [ - 'type' => 'check', - ], - ], - 'name' => [ - 'exclude' => 0, - 'label' => 'Name', - 'config' => [ - 'type' => 'input', - 'cols' => 30, - 'eval' => 'trim,required' - ], - ], - 'path_segment' => [ - 'exclude' => 0, - 'label' => 'URL Segment', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required,unique,alphanum_x,lower' - ], - ], - 'concept' => [ - 'exclude' => 0, - 'label' => 'Konzept', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingleBox', - 'foreign_table' => 'tx_epproducts_domain_model_concept', - 'foreign_table_where' => 'AND 1=1 ORDER BY name', - 'minItems' => 0, - 'maxitems' => 10, - 'size' => 5, - 'items' => [ - [ 'Keine Auswahl', 0 ], - ] - ], - ], - 'country' => [ - 'exclude' => 0, - 'label' => 'Land', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'tx_epproducts_domain_model_country', - 'foreign_table_where' => 'AND 1=1 ORDER BY name', - 'minitems' => 0, - 'maxitems' => 1, - 'items' => [ - [ 'Keine Auswahl', 0 ], - ] - ], - ], - 'region' => [ - 'exclude' => 0, - 'label' => 'Gebiet', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'tx_epproducts_domain_model_region', - 'foreign_table_where' => 'AND 1=1 ORDER BY name', - 'minitems' => 0, - 'maxitems' => 1, - 'items' => [ - [ 'Keine Auswahl', 0 ], - ] - ], - ], - 'hotel' => [ - 'exclude' => 0, - 'label' => 'Hotel', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'tx_epproducts_domain_model_hotel', - 'foreign_table_where' => 'AND 1=1 ORDER BY tx_epproducts_domain_model_hotel.name', - 'minitems' => 0, - 'maxitems' => 1, - 'items' => [ - [ 'Keine Auswahl', 0 ], - ] - ], - ], - 'hotel_types' => [ - 'exclude' => 0, - 'label' => 'Unterkunftsarten', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectCheckBox', - 'items' => [ - [ 'Keine Auswahl', 0 ], - [ 'Standard', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_STANDARD ], - [ 'Komfort', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_COMFORT ], - [ 'Deluxe', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_DELUXE ], - [ 'Superdeluxe', \EP\EpProducts\Domain\Model\Hotel::CATEGORY_SUPER_DELUXE ], - ], - 'minitems' => 0, - 'maxitems' => 99, - ] - ], - 'date_from' => [ - 'exclude' => 0, - 'label' => 'Datum von', - 'config' => [ - 'dbType' => 'date', - 'type' => 'input', - 'size' => 7, - 'eval' => 'date', - 'checkbox' => 0, - 'default' => '0000-00-00', - 'renderType' => 'inputDateTime', - ] - ], - 'date_to' => [ - 'exclude' => 0, - 'label' => 'Datum bis', - 'config' => [ - 'dbType' => 'date', - 'type' => 'input', - 'size' => 7, - 'eval' => 'date', - 'checkbox' => 0, - 'default' => '0000-00-00', - 'renderType' => 'inputDateTime', - ] - ], - 'pax' => [ - 'exclude' => 0, - 'label' => 'Personen', - 'config' => [ - 'type' => 'input', - 'size' => 2, - 'eval' => 'int', - ] - ] - ], -]; diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfo.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfo.php deleted file mode 100644 index a65bd53..0000000 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfo.php +++ /dev/null @@ -1,374 +0,0 @@ - [ - 'title' => 'Reiseinformationen', - 'default_sortby' => 'ORDER BY title', - 'label' => 'title', - 'prependAtCopy' => '[COPY %s]', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'origUid' => 't3_origuid', - 'dividers2tabs' => true, - 'versioningWS' => true, - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'title,travel_code', - 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', - ], - 'types' => [ - '1' => [ - 'showitem' => '--palette--;;basics,--div--;Texte,--palette--;;text,--div--;Bilder,--palette--;;images', - ], - ], - 'palettes' => [ - 'basics' => ['showitem' => 'title,path_segment,--linebreak--,travel_code,hide_address,--linebreak--,links, - --linebreak--,teasers'], - 'text' => ['showitem' => 'subline,headline,--linebreak--,intro_text,--linebreak--, bus_info_text,--linebreak--, - departure_text,--linebreak--,footer_text,--linebreak--,self_arranged_text,--linebreak--,additional_info, - --linebreak--,important_phone_numbers,--linebreak--,important_links'], - 'images' => ['showitem' => 'header_image,--linebreak--,footer_image'], - ], - 'columns' => [ - '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, - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_epproducts_domain_model_travelinfo', - 'foreign_table_where' => 'AND tx_epproducts_domain_model_travelinfo.pid=###CURRENT_PID### AND tx_epproducts_domain_model_travelinfo.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], - - 'hidden' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - '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', - 'size' => 13, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'behaviour' => [ - 'allowLanguageSynchronization' => true, - ], - 'renderType' => 'inputDateTime', - ], - ], - - 'title' => [ - 'exclude' => false, - 'label' => 'Titel (nur intern genutzt)', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required' - ], - ], - 'subline' => [ - 'exclude' => 0, - 'label' => 'Subline', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'headline' => [ - 'exclude' => 0, - 'label' => 'Headline', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'header_image' => [ - 'exclude' => 0, - 'label' => 'Headerbild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'header_image', - [ - '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', - ], - ], - ], - 'maxitems' => 1, - 'minitems' => 1, - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), - ], - 'footer_image' => [ - 'exclude' => 0, - 'label' => 'Footerbild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'footer_image', - [ - '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', - ], - ], - ], - 'maxitems' => 1, - 'minitems' => 1, - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), - ], - 'travel_code' => [ - 'exclude' => false, - 'label' => 'Reisecode', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required' - ], - ], - 'hide_address' => [ - 'exclude' => 0, - 'label' => 'Adresse ausblenden', - 'config' => [ - 'type' => 'check', - ], - ], - 'intro_text' => [ - 'exclude' => false, - 'label' => 'Introtext', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 3, - 'eval' => 'trim,required', - 'enableRichtext' => true, - ] - ], - 'bus_info_text' => [ - 'exclude' => false, - 'label' => 'Businfo', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 3, - 'eval' => 'trim', - 'enableRichtext' => true, - ] - ], - 'departure_text' => [ - 'exclude' => false, - 'label' => 'Abreise', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 3, - 'eval' => 'trim', - 'enableRichtext' => true, - ] - ], - 'footer_text' => [ - 'exclude' => false, - 'label' => 'Footertext', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 3, - 'eval' => 'trim,required', - 'enableRichtext' => true, - ] - ], - 'self_arranged_text' => [ - 'exclude' => false, - 'label' => 'Eigenanreise', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 15, - 'eval' => 'trim', - 'enableRichtext' => true, - ] - ], - 'additional_info' => [ - 'exclude' => false, - 'label' => 'Weitere Infos', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 15, - 'eval' => 'trim', - 'enableRichtext' => true, - ] - ], - 'important_phone_numbers' => [ - 'exclude' => false, - 'label' => 'Wichtige Telefonnummern', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 15, - 'eval' => 'trim', - 'enableRichtext' => true, - ] - ], - 'important_links' => [ - 'exclude' => false, - 'label' => 'Wichtige Links', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 15, - 'eval' => 'trim', - 'enableRichtext' => true, - ] - ], - 'teasers' => [ - 'exclude' => false, - 'label' => 'Inhalte', - 'config' => [ - 'type' => 'inline', - 'foreign_table' => 'tx_epproducts_domain_model_travelinfoteaser', - 'foreign_sortby' => 'sorting', - 'foreign_field' => 'tx_epproducts_travelinfo', - 'minitems' => 0, - 'maxitems' => 99, - 'appearance' => [ - 'collapseAll' => true, - 'expandSingle' => true, - 'levelLinksPosition' => 'bottom', - 'useSortable' => true, - 'showPossibleLocalizationRecords' => false, - 'showRemovedLocalizationRecords' => false, - 'showAllLocalizationLink' => false, - 'showSynchronizationLink' => false, - 'enabledControls' => [ - 'info' => false, - ], - ], - 'behaviour' => [ - 'allowLanguageSynchronization' => false, - ], - ] - ], - 'links' => [ - 'exclude' => false, - 'label' => 'Links', - 'config' => [ - 'type' => 'inline', - 'foreign_table' => 'tx_epproducts_domain_model_travelinfolink', - 'foreign_sortby' => 'sorting', - 'foreign_field' => 'tx_epproducts_travelinfo', - 'minitems' => 0, - 'maxitems' => 3, - 'appearance' => [ - 'collapseAll' => true, - 'expandSingle' => true, - 'levelLinksPosition' => 'bottom', - 'useSortable' => true, - 'showPossibleLocalizationRecords' => false, - 'showRemovedLocalizationRecords' => false, - 'showAllLocalizationLink' => false, - 'showSynchronizationLink' => false, - 'enabledControls' => [ - 'info' => false, - ], - ], - 'behaviour' => [ - 'allowLanguageSynchronization' => false, - ], - ] - ], - 'path_segment' => [ - 'exclude' => 0, - 'label' => 'URL', - 'config' => [ - 'type' => 'slug', - 'generatorOptions' => [ - 'fields' => ['title'], - 'prefixParentPageSlug' => false, - 'replacements' => [ - '/' => '-', - ], - ], - 'fallbackCharacter' => '-', - 'eval' => 'unique', - ], - ], - ], -]; diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfolink.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfolink.php deleted file mode 100644 index 552ed74..0000000 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfolink.php +++ /dev/null @@ -1,167 +0,0 @@ - [ - 'title' => 'Reiseinfo Link', - 'label' => 'title', - 'prependAtCopy' => '[COPY %s]', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - 'versioningWS' => true, - 'hideTable' => true, - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'title', - 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', - ], - 'types' => [ - '1' => [ - 'showitem' => '--palette--;;basics,link', - ], - ], - 'palettes' => [ - 'basics' => ['showitem' => 'title,icon,hidden'], - ], - 'columns' => [ - - 'sys_language_uid' => [ - 'exclude' => false, - '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, - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_epproducts_domain_model_travelinfolink', - 'foreign_table_where' => 'AND tx_epproducts_domain_model_travelinfolink.pid=###CURRENT_PID### AND tx_epproducts_domain_model_travelinfolink.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], - - 'hidden' => [ - 'exclude' => false, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => false, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - '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', - 'size' => 13, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'behaviour' => [ - 'allowLanguageSynchronization' => true, - ], - 'renderType' => 'inputDateTime', - ], - ], - - 'title' => [ - 'exclude' => false, - 'label' => 'Bezeichnung', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required' - ], - ], - 'link' => [ - 'exclude' => false, - 'label' => 'Link', - 'config' => [ - 'type' => 'input', - 'renderType' => 'inputLink', - 'size' => 30, - 'eval' => 'trim,required' - ], - ], - 'icon' => [ - 'exclude' => 0, - 'label' => 'Icon', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - ['Anreise', 'travel'], - ['Skipass', 'skipass'], - ['Kurse', 'course'], - ['Verpflegung', 'food'], - ['Gepäck', 'luggage'], - ['Lift', 'lift'], - ['Webcam', 'webcam'], - ['Wetter', 'weather'], - ['Wissenswertes', 'chat'], - ['Währung', 'currency'], - ], - ], - ], - 'tx_epproducts_travelinfo' => [ - 'config' => [ - 'type' => 'passthrough' - ] - ], - 'sorting' => [ - 'config' => [ - 'type' => 'passthrough' - ] - ], - ], -]; diff --git a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfoteaser.php b/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfoteaser.php deleted file mode 100644 index d22d0d7..0000000 --- a/packages/ep_products/Configuration/TCA/tx_epproducts_domain_model_travelinfoteaser.php +++ /dev/null @@ -1,220 +0,0 @@ - [ - 'title' => 'Reiseinfo Teaser', - 'label' => 'title', - 'prependAtCopy' => '[COPY %s]', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'origUid' => 't3_origuid', - 'dividers2tabs' => true, - 'versioningWS' => true, - 'hideTable' => true, - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'title', - 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', - ], - 'types' => [ - '1' => [ - 'showitem' => '--palette--;;basics,bodytext,image', - ], - ], - 'palettes' => [ - 'basics' => ['showitem' => 'title,category,hidden'], - ], - 'columns' => [ - - 'sys_language_uid' => [ - 'exclude' => false, - '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, - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_epproducts_domain_model_travelinfoteaser', - 'foreign_table_where' => 'AND tx_epproducts_domain_model_travelinfoteaser.pid=###CURRENT_PID### AND tx_epproducts_domain_model_travelinfoteaser.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], - - 'hidden' => [ - 'exclude' => false, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => false, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - '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', - 'size' => 13, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'behaviour' => [ - 'allowLanguageSynchronization' => true, - ], - 'renderType' => 'inputDateTime', - ], - ], - - 'title' => [ - 'exclude' => false, - 'label' => 'Bezeichnung/Überschrift', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required' - ], - ], - 'bodytext' => [ - 'exclude' => false, - 'label' => 'Text', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 15, - 'eval' => 'trim,required', - 'enableRichtext' => true, - ] - ], - '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' => ' - --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' => 'quadtratisch', - 'value' => 1, - ], - ], - ], - ], - ], - ], - ], - ], - 'maxitems' => 1, - 'minitems' => 1, - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), - ], - 'category' => [ - 'exclude' => 0, - 'label' => 'Kategorie/Icon', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - ['Anreise', 'travel'], - ['Auto', 'car'], - ['Bus', 'bus'], - ['Gepäck', 'luggage'], - ['Getränke', 'drinks'], - ['Kurse', 'course'], - ['Lift', 'lift'], - ['Programm', 'program'], - ['Skipass', 'skipass'], - ['Verpflegung', 'food'], - ['Webcam', 'webcam'], - ['Wetter', 'weather'], - ['Wissenswertes', 'chat'], - ['Leihmaterial', 'rental'], - ['Teilnehmer', 'participants'], - ['Bett', 'bed'], - ['Ablauf', 'sequence'], - ['Partner', 'partner'], - ], - 'maxitems' => 1, - 'minitems' => 1, - ], - ], - 'tx_epproducts_travelinfo' => [ - 'config' => [ - 'type' => 'passthrough' - ] - ], - 'sorting' => [ - 'config' => [ - 'type' => 'passthrough' - ] - ], - ], -]; diff --git a/packages/ep_products/Resources/Private/Language/locallang_mod.xlf b/packages/ep_products/Resources/Private/Language/locallang_mod.xlf deleted file mode 100644 index 1c09931..0000000 --- a/packages/ep_products/Resources/Private/Language/locallang_mod.xlf +++ /dev/null @@ -1,17 +0,0 @@ - - - -
- - - E&P Funktionen - - - Produktspezifische Funktionen - - - Produkte - - - - diff --git a/packages/ep_products/Resources/Private/Layouts/Backend.html b/packages/ep_products/Resources/Private/Layouts/Backend.html deleted file mode 100644 index a606ca0..0000000 --- a/packages/ep_products/Resources/Private/Layouts/Backend.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/ep_products/Resources/Private/Templates/Backend/Index.html b/packages/ep_products/Resources/Private/Templates/Backend/Index.html deleted file mode 100644 index a632d29..0000000 --- a/packages/ep_products/Resources/Private/Templates/Backend/Index.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - -

E&P Funktionen

- -
-
-

BusPro Daten

-
-
-

- Letzter Produktdaten-Import: {f:if(condition: productDataUpdatedTimestamp, then: '{productDataUpdatedTimestamp -> f:format.date(format: \'d.m.Y H:i:s\')}', else: '-')} -

-

- Letzter Kontingente-Import: {f:if(condition: contingentsDataUpdatedTimestamp, then: '{contingentsDataUpdatedTimestamp -> f:format.date(format: \'d.m.Y H:i:s\')}', else: '-')} -

-

- Hinweis: TYPO3 prüft alle 15 Minuten, ob ein XML Upload aus BusPro erfolgt ist (automatisch - oder manuell) und führt sofort einen Import durch falls erforderlich. -

-
-
-

- - - Schneehöhen importieren - -

-

- - - Suchschlitz Auswertung EP Reisen (CSV Download) - -

-

- - - Suchschlitz Auswertung EP Events (CSV Download) - -

-
- - diff --git a/packages/ep_products/ext_conf_template.txt b/packages/ep_products/ext_conf_template.txt index 37e6e94..54d4506 100644 --- a/packages/ep_products/ext_conf_template.txt +++ b/packages/ep_products/ext_conf_template.txt @@ -40,42 +40,6 @@ bpnConnectApiTimeout = 5 # cat=MyEpAPI; type=int; label=Bpn Connect API max total request duration in seconds (0 = unlimited) bpnConnectApiMaxDuration = 15 -# cat=EpTeamAPI; type=string; label=MyE&P Team base URL (https, e.g. https://team.ep-reisen.de) - receives application form submissions -epTeamApiBaseUrl = - -# cat=EpTeamAPI; type=string; label=MyE&P Team application form API key (sent as X-Api-Key) -epTeamApiKey = - -# cat=EpTeamAPI; type=int; label=MyE&P Team API inactivity timeout in seconds (0 = PHP default_socket_timeout) -epTeamApiTimeout = 5 - -# cat=EpTeamAPI; type=int; label=MyE&P Team API max total request duration in seconds (0 = unlimited) -epTeamApiMaxDuration = 15 - -# cat=SftpImport; type=options[Remote SFTP server=sftp,Local directory (fileadmin/xmlexport)=local,MyE&P API=api]; label=Product/date import source -productImportSource = sftp - -# cat=SftpImport; type=string; label=SFTP host for product/date import -productImportSftpHost = - -# cat=SftpImport; type=int+; label=SFTP port -productImportSftpPort = 22 - -# cat=SftpImport; type=string; label=SFTP username -productImportSftpUser = - -# cat=SftpImport; type=string; label=SFTP password -productImportSftpPassword = - -# cat=SftpImport; type=string; label=Remote directory holding Ziel_*.xml, zustiege.xml and uebertragung.info -productImportSftpRemotePath = / - -# cat=SftpImport; type=string; label=Expected SSH host key (optional; "ssh-ed25519 AAAA..." or "SHA256:..."; empty disables the check) -productImportSftpHostKey = - -# cat=SftpImport; type=int+; label=SFTP connection timeout in seconds -productImportSftpTimeout = 15 - # cat=ContentFeed; type=string; label=API key for the CMS backchannel endpoints used by MyE&P (/api/hotel, /api/product, /api/content/*); sent as X-Api-Key or ?key=. Empty denies every request. cmsApiKey = diff --git a/packages/ep_products/ext_localconf.php b/packages/ep_products/ext_localconf.php index 6e0e7d0..8bb45e6 100644 --- a/packages/ep_products/ext_localconf.php +++ b/packages/ep_products/ext_localconf.php @@ -15,35 +15,6 @@ $boot = function () { // Client-side callers pass these parameters in POST bodies, which cHash never inspects. $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['requireCacheHashPresenceParameters'][] = '^tx_epproducts_ajax'; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['ep_products'] = - \EP\EpProducts\Hooks\Tcemain::class; - - $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\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', - ], - ], - ]; - $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); $iconRegistry->registerIcon( 'ep-logo', @@ -51,25 +22,6 @@ $boot = function () { ['source' => 'EXT:ep_products/Resources/Public/Icons/logo.svg'] ); - \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', 'product_detail', @@ -94,227 +46,19 @@ $boot = function () { ] ); - \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_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', - 'newsletter_subscription', - [ - 'Newsletter' => 'subscriptionForm,subscriptionFormSubmit', - ], - [ - 'Newsletter' => 'subscriptionForm,subscriptionFormSubmit', - ] - ); - - \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', - 'travelinfo', - [ - 'Travelinfo' => 'travelInfo,travelCode', - ] - ); - \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,priceConfig,priceCalendar,priceTable', - 'AjaxWatchlist' => 'list', 'AjaxTeaserPopup' => 'concept', ], [ - 'AjaxSearch' => 'searchresult', - 'AjaxFilterPanel' => 'index', - 'AjaxDate' => 'dates', - 'AjaxContingent' => 'list,rooms', 'AjaxTable' => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms', - 'AjaxCalendar' => 'range', - 'AjaxWatchlist' => 'list', 'AjaxTeaserPopup' => 'concept', ] ); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'ical', - [ - 'Ical' => 'contingents', - ], - [ - 'Ical' => 'contingents', - ] - ); - - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'EP.ep_products', - 'api', - [ - 'Api' => 'product,hotel', - ] - ); - - $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'][] = '_gl'; $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'gclid'; $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'ref'; @@ -339,19 +83,6 @@ $boot = function () { ], ], ]; - - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['teamSlug'] = - \EP\EpProducts\Updates\TeamSlugUpdater::class; - - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['tx_epproducts_log'] = [ - 'dateField' => 'time_micro', - 'expirePeriod' => '180', - ]; - - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['tx_epevents_log'] = [ - 'dateField' => 'time_micro', - 'expirePeriod' => '180', - ]; }; $boot(); diff --git a/packages/ep_products/ext_tables.php b/packages/ep_products/ext_tables.php deleted file mode 100644 index 84ec6b2..0000000 --- a/packages/ep_products/ext_tables.php +++ /dev/null @@ -1,22 +0,0 @@ - 'index, importProducts, importContingents, importSnowReport, dumpSearchLogEpreisen, dumpSearchLogEpevents', - ], - [ - 'access' => 'user,group', - 'labels' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang_mod.xlf', - 'icon' => 'EXT:ep_products/Resources/Public/Icons/logo.svg' - ] - ); - -}); diff --git a/packages/ep_theme/Classes/Controller/BackendController.php b/packages/ep_theme/Classes/Controller/BackendController.php deleted file mode 100644 index 151b4be..0000000 --- a/packages/ep_theme/Classes/Controller/BackendController.php +++ /dev/null @@ -1,83 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpTheme\Domain\Repository\PageRepository; -use TYPO3\CMS\Backend\View\BackendTemplateView; -use TYPO3\CMS\Core\Database\ConnectionPool; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; - -class BackendController extends ActionController -{ - /** - * Backend Template Container - * - * @var BackendTemplateView - */ - protected $defaultViewObjectName = BackendTemplateView::class; - - /** - * BackendTemplateContainer - * - * @var BackendTemplateView - */ - protected $view; - - /** - * @var int - */ - protected $pageUid; - - /** - * @var PageRepository - */ - protected $pageRepository; - - /** - * @param PageRepository $pageRepository - */ - public function __construct(PageRepository $pageRepository) - { - $this->pageRepository = $pageRepository; - } - - public function initializeAction() - { - $this->pageUid = (int)GeneralUtility::_GET('id'); - - parent::initializeAction(); - } - - public function listPagesAction() - { - $pages = $this->pageRepository->findPagesByPid($this->pageUid, true); - - $this->view->assign('pages', $pages); - } -} diff --git a/packages/ep_theme/Classes/Domain/Model/Dto/ContactForm.php b/packages/ep_theme/Classes/Domain/Model/Dto/ContactForm.php deleted file mode 100644 index 5959573..0000000 --- a/packages/ep_theme/Classes/Domain/Model/Dto/ContactForm.php +++ /dev/null @@ -1,351 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -class ContactForm -{ - const FORM_TYPE_SIMPLE = 1; - const FORM_TYPE_FULL = 2; - - /** - * @var int - */ - protected $formType = 1; - - /** - * Honeypot field!! - * - * @var string - */ - protected $subject; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $name; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $firstName; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $gender; - - /** - * @var string - */ - protected $company; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - * @TYPO3\CMS\Extbase\Annotation\Validate("EmailAddress") - */ - protected $email; - - /** - * @var string - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $phone; - - /** - * @var string - */ - protected $period; - - /** - * @var string - */ - protected $duration; - - /** - * @var string - */ - protected $pax; - - /** - * @var string - */ - protected $age; - - /** - * @var string - */ - protected $children; - - /** - * @var string - */ - protected $inquiry; - - /** - * @var string - */ - protected $pageUrl; - - /** - * @param string $pageUrl - * @param int $formType - */ - public function __construct($pageUrl = null, $formType = 1) - { - $this->pageUrl = $pageUrl; - $this->formType = $formType; - } - - /** - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * @param string $subject - */ - public function setSubject($subject) - { - $this->subject = $subject; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - } - - /** - * @return string - */ - public function getGender() - { - return $this->gender; - } - - /** - * @param string $gender - */ - public function setGender($gender) - { - $this->gender = $gender; - } - - /** - * @return string - */ - public function getCompany() - { - return $this->company; - } - - /** - * @param string $company - */ - public function setCompany($company) - { - $this->company = $company; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - */ - public function setEmail($email) - { - $this->email = $email; - } - - /** - * @return string - */ - public function getPhone() - { - return $this->phone; - } - - /** - * @param string $phone - */ - public function setPhone($phone) - { - $this->phone = $phone; - } - - /** - * @return string - */ - public function getPeriod() - { - return $this->period; - } - - /** - * @param string $period - */ - public function setPeriod($period) - { - $this->period = $period; - } - - /** - * @return string - */ - public function getDuration() - { - return $this->duration; - } - - /** - * @param string $duration - */ - public function setDuration($duration) - { - $this->duration = $duration; - } - - /** - * @return string - */ - public function getPax() - { - return $this->pax; - } - - /** - * @param string $pax - */ - public function setPax($pax) - { - $this->pax = $pax; - } - - /** - * @return string - */ - public function getAge() - { - return $this->age; - } - - /** - * @param string $age - */ - public function setAge($age) - { - $this->age = $age; - } - - /** - * @return string - */ - public function getChildren() - { - return $this->children; - } - - /** - * @param string $children - */ - public function setChildren($children) - { - $this->children = $children; - } - - /** - * @return string - */ - public function getInquiry() - { - return $this->inquiry; - } - - /** - * @param string $inquiry - */ - public function setInquiry($inquiry) - { - $this->inquiry = $inquiry; - } - - /** - * @return string - */ - public function getPageUrl() - { - return $this->pageUrl; - } - - /** - * @param string $pageUrl - */ - public function setPageUrl($pageUrl) - { - $this->pageUrl = $pageUrl; - } - -} diff --git a/packages/ep_theme/Classes/Exception/ConfigurationMissingException.php b/packages/ep_theme/Classes/Exception/ConfigurationMissingException.php deleted file mode 100644 index a59dd0a..0000000 --- a/packages/ep_theme/Classes/Exception/ConfigurationMissingException.php +++ /dev/null @@ -1,6 +0,0 @@ - local form element identifier. - */ - protected function parseMapping(): array - { - $mappings = []; - $mappingOption = (string)$this->parseOption('mapping'); - - foreach (GeneralUtility::trimExplode(',', $mappingOption, true) as $mapping) { - $parts = GeneralUtility::trimExplode(':', $mapping, true, 2); - if (2 !== count($parts)) { - continue; - } - - [$remote, $local] = $parts; - if ('' === $remote || '' === $local) { - continue; - } - - $mappings[$remote] = $local; - } - - return $mappings; - } - - /** - * The mapped values, keyed by the remote name the receiving side expects. Values pass through - * normalizeValue() just like the labeled ones do, so a date element arrives as a Y-m-d string - * instead of a serialized DateTime. A value that does not survive normalization keeps its key: - * the remote names make up the request shape and dropping one would change it. - */ - protected function buildPayload(): array - { - $values = []; - $formValues = $this->finisherContext->getFormValues(); - - foreach ($this->parseMapping() as $remote => $local) { - if (false === array_key_exists($local, $formValues)) { - continue; - } - - $values[$remote] = $this->normalizeValue($formValues[$local], $local); - } - - return $values; - } - - /** - * Every submitted value that the mapping does not already cover, keyed by the element label - * as the editor sees it in the form editor. Forms built in the backend use generated - * identifiers (text-1, singleselect-2, ...) that carry no meaning and cannot be renamed - * without breaking existing finisher options, so the label is the only stable description - * of what was asked. - * - * The label is taken from the form definition, not through TranslationService: a translated - * label would change the payload keys with the site language, and these keys are stored. - */ - protected function buildLabeledValues(): array - { - $formValues = $this->finisherContext->getFormValues(); - $skip = array_merge( - array_values($this->parseMapping()), - GeneralUtility::trimExplode(',', (string)$this->parseOption('exclude'), true) - ); - - // Keyed by identifier in form order, and contains only real form elements - iterating - // this instead of the form values keeps the collection in the order of the form and - // leaves out anything that is not an element the visitor filled in. - $elements = $this->finisherContext->getFormRuntime()->getFormDefinition()->getElements(); - - $collected = []; - foreach ($elements as $identifier => $element) { - if (true === in_array($identifier, $skip, true) || false === array_key_exists($identifier, $formValues)) { - continue; - } - - $value = $this->normalizeValue($formValues[$identifier], $identifier); - if (null === $value || '' === $value || [] === $value) { - continue; - } - - $label = trim($element->getLabel()); - if ('' === $label) { - $label = $identifier; - } - if (true === array_key_exists($label, $collected)) { - $label .= ' (' . $identifier . ')'; - } - - $collected[$label] = $value; - } - - return $collected; - } - - /** - * @param mixed $value - * - * @return mixed null when the value has no JSON representation - */ - protected function normalizeValue($value, string $identifier) - { - if (true === is_array($value)) { - $normalized = []; - foreach ($value as $item) { - $item = $this->normalizeValue($item, $identifier); - if (null !== $item && '' !== $item) { - $normalized[] = $item; - } - } - - return $normalized; - } - - if ($value instanceof \DateTimeInterface) { - return $value->format('Y-m-d'); - } - - if ($value instanceof FileReference) { - $resource = $value->getOriginalResource(); - - return null !== $resource ? $resource->getName() : null; - } - - if (true === is_object($value)) { - $this->logWarning('Form value skipped while collecting labeled values: unsupported type.', [ - 'element' => $identifier, - 'class' => get_class($value), - ]); - - return null; - } - - return $value; - } - - protected function logWarning(string $message, array $context = []): void - { - GeneralUtility::makeInstance(LogManager::class) - ->getLogger(static::class) - ->warning($message, array_merge([ - 'finisher' => static::class, - ], $context)); - } -} diff --git a/packages/ep_theme/Classes/Form/AddReferrerFinisher.php b/packages/ep_theme/Classes/Form/AddReferrerFinisher.php deleted file mode 100644 index ec01204..0000000 --- a/packages/ep_theme/Classes/Form/AddReferrerFinisher.php +++ /dev/null @@ -1,74 +0,0 @@ -addCurrentUrlField(); - $this->addReferrerField(); - } - - private function addReferrerField(): void - { - // Look for key 'referrer' in frontend session - $referrer = $GLOBALS['TSFE']->fe_user->getKey('ses', 'referrer'); - - if (null === $referrer) { - return; - } - - // Add textfield to form containing referrer value - $field = $this->finisherContext - ->getFormRuntime() - ->getFormDefinition() - ->getPageByIndex(0) - ->createElement('referrer', 'Text'); - - $field->setDefaultValue($referrer); - $field->setDataType('string'); - $field->setLabel('Referrer'); - - // Add finisher variable for potential later use - $this->finisherContext->getFinisherVariableProvider()->add( - $this->shortFinisherIdentifier, - 'referrer', - $referrer - ); - - // Remove session key - $GLOBALS['TSFE']->fe_user->setKey('ses', 'referrer', null); - $GLOBALS['TSFE']->fe_user->storeSessionData(); - } - - private function addCurrentUrlField(): void - { - // Get URL of current page - $pageId = $GLOBALS['TSFE']->id; - $site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageId); - $url = $site->getRouter()->generateUri($pageId); - - // Add textfield to form containing url value - $field = $this->finisherContext - ->getFormRuntime() - ->getFormDefinition() - ->getPageByIndex(0) - ->createElement('pageurl', 'Text'); - - $field->setDefaultValue($url); - $field->setDataType('string'); - $field->setLabel('URL'); - - // Add finisher variable for potential later use - $this->finisherContext->getFinisherVariableProvider()->add( - $this->shortFinisherIdentifier, - 'pageurl', - $url - ); - } -} diff --git a/packages/ep_theme/Classes/Form/ApplicationApiFinisher.php b/packages/ep_theme/Classes/Form/ApplicationApiFinisher.php deleted file mode 100644 index 1a30cda..0000000 --- a/packages/ep_theme/Classes/Form/ApplicationApiFinisher.php +++ /dev/null @@ -1,83 +0,0 @@ -apiClient = $apiClient; - } - - protected function executeInternal() - { - try { - $payload = $this->buildPayload(); - if ([] === $payload) { - $this->logWarning('Application form API finisher skipped: the mapping produced no values.'); - - return; - } - - $formDefinition = $this->finisherContext->getFormRuntime()->getFormDefinition(); - $formLabel = trim($formDefinition->getLabel()); - - $payload['form'] = $formDefinition->getIdentifier(); - // The name the editor gave the form, so the receiving side can label a submission - // without keeping a list of identifiers. Taken from the definition rather than - // through TranslationService: a translated label would differ per site language. - $payload['formLabel'] = '' !== $formLabel ? $formLabel : $formDefinition->getIdentifier(); - $payload['submittedAt'] = (new \DateTimeImmutable())->format(\DateTimeInterface::ATOM); - $payload = array_merge($payload, $this->resolvePageContext()); - $payload['details'] = $this->buildLabeledValues(); - - $this->apiClient->submitApplicationForm($payload); - } catch (\Throwable $e) { - $this->logWarning('Application form API finisher request failed.', [ - 'exception' => $e, - ]); - } - } - - /** - * The page the form was submitted from. The URL is generated through the site router in the - * visitor's language, the same way AddReferrerFinisher does it, so it is the page's canonical - * URL rather than the submit request with its form arguments attached. - */ - private function resolvePageContext(): array - { - if (false === isset($GLOBALS['TSFE']) || 0 === (int)$GLOBALS['TSFE']->id) { - return []; - } - - $pageUid = (int)$GLOBALS['TSFE']->id; - $context = ['pageUid' => $pageUid]; - - try { - $site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageUid); - $context['pageUrl'] = (string)$site->getRouter()->generateUri($pageUid, [ - '_language' => $GLOBALS['TSFE']->getLanguage(), - ]); - } catch (\Throwable $e) { - // An unroutable page must not cost the submission, so the uid is sent without a URL. - $this->logWarning('Application form API finisher could not resolve the page URL.', [ - 'pageUid' => $pageUid, - 'exception' => $e, - ]); - } - - return $context; - } -} diff --git a/packages/ep_theme/Classes/Form/BpnApiFinisher.php b/packages/ep_theme/Classes/Form/BpnApiFinisher.php deleted file mode 100644 index c115ebb..0000000 --- a/packages/ep_theme/Classes/Form/BpnApiFinisher.php +++ /dev/null @@ -1,35 +0,0 @@ -apiClient = $apiClient; - } - - protected function executeInternal() - { - try { - $values = $this->buildPayload(); - if ([] !== $values) { - $this->apiClient->registerAddress($values); - } - } catch (\Throwable $e) { - $this->logWarning('Bpn API finisher request failed.', [ - 'exception' => $e, - ]); - } - } -} diff --git a/packages/ep_theme/Classes/Form/WebhookFinisher.php b/packages/ep_theme/Classes/Form/WebhookFinisher.php deleted file mode 100644 index 1c94395..0000000 --- a/packages/ep_theme/Classes/Form/WebhookFinisher.php +++ /dev/null @@ -1,40 +0,0 @@ -parseOption('url')); - if ('' === $url) { - return; - } - - $payload = $this->buildPayload(); - if ([] === $payload) { - return; - } - - $response = HttpClient::create()->request('POST', $url, [ - 'json' => $payload, - ]); - - $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode >= 300) { - $this->logWarning('Webhook finisher returned an unexpected response status.', [ - 'url' => $url, - 'statusCode' => $statusCode, - ]); - } - } catch (\Throwable $e) { - $this->logWarning('Webhook finisher request failed.', [ - 'exception' => $e, - ]); - } - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/AbstractPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/AbstractPreviewRenderer.php deleted file mode 100644 index 7765f64..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/AbstractPreviewRenderer.php +++ /dev/null @@ -1,146 +0,0 @@ -cType)) { - throw new ConfigurationMissingException('Property cType must not be empty', 1586703436); - } - } - - public function preProcess( - PageLayoutView &$parentObject, - &$drawItem, - &$headerContent, - &$itemContent, - array &$row - ) { - $this->data = &$row; - if ($this->isCtypeMatching() && $this->checkTemplateFile()) { - $drawItem = false; - $headerContent = $this->getHeaderContent(); - $itemContent .= $this->getBodytext(); - } - } - - protected function getHeaderContent(): string - { - return '
'; - } - - protected function getBodytext(): string - { - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $standaloneView = $objectManager->get(StandaloneView::class); - $standaloneView->setTemplatePathAndFilename($this->getTemplateFile()); - $standaloneView->assignMultiple($this->getAssignmentsForTemplate() + [ - 'data' => $this->data, - 'flexForm' => $this->getFlexForm(), - 'firstImage' => count($this->getImages()) > 0 ? $this->getImages()[0] : null, - 'images' => $this->getImages() - ]); - return $standaloneView->render(); - } - - protected function getAssignmentsForTemplate(): array - { - return []; - } - - protected function getFlexForm(): array - { - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $flexFormService = $objectManager->get(FlexFormService::class); - return $flexFormService->convertFlexFormContentToArray($this->data['pi_flexform']); - } - - protected function getImages(int $uid = null, string $tablenames = 'tt_content', string $fieldname = 'image'): array - { - $uid = $uid ?? $this->data['uid']; - $references = []; - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $fileRepository = $objectManager->get(FileRepository::class); - /** @var ConnectionPool $connectionPool */ - $connectionPool = $objectManager->get(ConnectionPool::class); - $queryBuilder = $connectionPool->getQueryBuilderForTable('sys_file_reference'); - $identifiers = (array)$queryBuilder - ->select('uid') - ->from('sys_file_reference') - ->where('uid_foreign=' . $uid . ' and tablenames="' . $tablenames . '" and fieldname="' . $fieldname . '"') - ->execute() - ->fetch(\PDO::FETCH_COLUMN); - foreach ($identifiers as $identifier) { - if ($identifier > 0) { - $reference = $fileRepository->findFileReferenceByUid($identifier); - if ($reference !== null) { - $references[] = $reference; - } - } - } - return $references; - } - - /** - * @return bool - */ - protected function isCtypeMatching(): bool - { - return $this->data['CType'] === $this->cType; - } - - protected function checkTemplateFile(): bool - { - if (is_file($this->getTemplateFile()) === false) { - throw new TemplateFileMissingException( - 'Expected template file for preview rendering for CType ' . $this->cType . ' is missing', - 1586703260 - ); - } - return true; - } - - protected function getTemplateFile(): string - { - return GeneralUtility::getFileAbsFileName( - $this->templatePath . GeneralUtility::underscoredToUpperCamelCase($this->data['CType']) . '.html' - ); - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/DisrupterPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/DisrupterPreviewRenderer.php deleted file mode 100644 index 523635b..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/DisrupterPreviewRenderer.php +++ /dev/null @@ -1,20 +0,0 @@ -data['tx_eptheme_disrupter']; - $content = BackendUtility::getRecord('tx_eptheme_domain_model_disrupter', $uid); - - return [ - 'content' => $content, - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/DisturberPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/DisturberPreviewRenderer.php deleted file mode 100644 index 088fed6..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/DisturberPreviewRenderer.php +++ /dev/null @@ -1,8 +0,0 @@ -data['tx_eptheme_context_region']; - if ((int)$uid > 0) { - $content = BackendUtility::getRecord('tx_epproducts_domain_model_region', $uid); - } else { - $uid = $this->data['tx_eptheme_context_hotel']; - $content = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $uid); - - } - - return [ - 'content' => $content, - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/LineupPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/LineupPreviewRenderer.php deleted file mode 100644 index d176373..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/LineupPreviewRenderer.php +++ /dev/null @@ -1,31 +0,0 @@ -get(ConnectionPool::class); - $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_eptheme_domain_model_lineup'); - $rows = $queryBuilder->select('*') - ->from('tx_eptheme_domain_model_lineup') - ->where('tt_content='.$this->data['uid']) - ->orderBy('sorting', 'ASC') - ->execute() - ->fetchAllAssociative(); - - return [ - 'rows' => $rows, - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserBookingLinkPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserBookingLinkPreviewRenderer.php deleted file mode 100644 index b89fe57..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserBookingLinkPreviewRenderer.php +++ /dev/null @@ -1,21 +0,0 @@ -data['tx_eptheme_context_product']; - $images = $this->getImages($productUid, 'tx_epproducts_domain_model_product', 'teaser_images'); - $product = BackendUtility::getRecord('tx_epproducts_domain_model_product', $productUid); - return [ - 'images' => $images, - 'product' => $product, - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserCityPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserCityPreviewRenderer.php deleted file mode 100644 index e8e1068..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserCityPreviewRenderer.php +++ /dev/null @@ -1,20 +0,0 @@ -data['tx_eptheme_context_city']; - $images = $this->getImages($uid, 'tx_epproducts_domain_model_city', 'teaser_images'); - return [ - 'images' => $images, - 'city' => BackendUtility::getRecord('tx_epproducts_domain_model_city', $uid), - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserConceptPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserConceptPreviewRenderer.php deleted file mode 100644 index ea52ab9..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserConceptPreviewRenderer.php +++ /dev/null @@ -1,20 +0,0 @@ -data['tx_eptheme_context_concept']; - $images = $this->getImages($uid, 'tx_epproducts_domain_model_concept', 'teaser_images'); - return [ - 'images' => $images, - 'concept' => BackendUtility::getRecord('tx_epproducts_domain_model_concept', $uid), - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserCountryPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserCountryPreviewRenderer.php deleted file mode 100644 index 35ccbcc..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserCountryPreviewRenderer.php +++ /dev/null @@ -1,20 +0,0 @@ -data['tx_eptheme_context_country']; - $images = $this->getImages($countryUid, 'tx_epproducts_domain_model_country', 'teaser_images'); - return [ - 'images' => $images, - 'country' => BackendUtility::getRecord('tx_epproducts_domain_model_country', $countryUid), - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserHotelPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserHotelPreviewRenderer.php deleted file mode 100644 index 43d95d5..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserHotelPreviewRenderer.php +++ /dev/null @@ -1,20 +0,0 @@ -data['tx_eptheme_context_hotel']; - $images = $this->getImages($uid, 'tx_epproducts_domain_model_hotel', 'teaser_images'); - return [ - 'images' => $images, - 'hotel' => BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $uid), - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserProductPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserProductPreviewRenderer.php deleted file mode 100644 index 24ae891..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserProductPreviewRenderer.php +++ /dev/null @@ -1,24 +0,0 @@ -data['tx_eptheme_context_product']; - $hotelUid = $this->data['tx_eptheme_context_hotel']; - $images = $this->getImages($productUid, 'tx_epproducts_domain_model_product', 'teaser_images'); - $product = BackendUtility::getRecord('tx_epproducts_domain_model_product', $productUid); - $hotel = $hotelUid ? BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $hotelUid) : null; - return [ - 'images' => $images, - 'product' => $product, - 'hotel' => $hotel, - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserRegionPreviewRenderer.php b/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserRegionPreviewRenderer.php deleted file mode 100644 index 9d221b1..0000000 --- a/packages/ep_theme/Classes/Hooks/PageLayoutView/TeaserRegionPreviewRenderer.php +++ /dev/null @@ -1,20 +0,0 @@ -data['tx_eptheme_context_region']; - $images = $this->getImages($uid, 'tx_epproducts_domain_model_region', 'teaser_images'); - return [ - 'images' => $images, - 'region' => BackendUtility::getRecord('tx_epproducts_domain_model_region', $uid), - ]; - } -} diff --git a/packages/ep_theme/Classes/Hooks/Tcemain.php b/packages/ep_theme/Classes/Hooks/Tcemain.php deleted file mode 100644 index 3a5ba32..0000000 --- a/packages/ep_theme/Classes/Hooks/Tcemain.php +++ /dev/null @@ -1,62 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Core\DataHandling\DataHandler; - -class Tcemain -{ - /** - * @param array $fields - * @param string $table - * @param int $id - * @param DataHandler $dataHandler - */ - public function processDatamap_preProcessFieldArray(array &$fields, $table, $id, DataHandler $dataHandler) - { - // Get country code from associated country entity and store in page record - if ($table === 'pages') { - $countryUid = (int) $fields['tx_eptheme_context_country']; - if ($countryUid === 0) { - $fields['tx_eptheme_context_country_code'] = ''; - } else { - $country = BackendUtility::getRecord('tx_epproducts_domain_model_country', $countryUid); - if ($country !== null) { - $fields['tx_eptheme_context_country_code'] = $country['code']; - } - } - } - // Force unused colPos for content elements appended to news records - if ($table === 'tt_content') { - if (isset($dataHandler->datamap['tx_news_domain_model_news'])) { - $fields['colPos'] = 1848; - } - } - } -} diff --git a/packages/ep_theme/Classes/Middleware/ReferrerMiddleware.php b/packages/ep_theme/Classes/Middleware/ReferrerMiddleware.php deleted file mode 100644 index 6ad3e73..0000000 --- a/packages/ep_theme/Classes/Middleware/ReferrerMiddleware.php +++ /dev/null @@ -1,43 +0,0 @@ -getQueryParams(); - - if (!array_key_exists('ref', $queryParams)) { - return $handler->handle($request); - } - - $ref = $queryParams['ref']; - - if (false === is_numeric($ref)) { - return $handler->handle($request); - } - - /** @var SiteFinder $siteFinder */ - $siteFinder = GeneralUtility::makeInstance(SiteFinder::class); - - try { - $site = $siteFinder->getSiteByPageId((int) $ref); - $url = $site->getRouter()->generateUri($ref); - $GLOBALS['TSFE']->fe_user->setKey('ses', 'referrer', $url); - $GLOBALS['TSFE']->fe_user->storeSessionData(); - } - catch (SiteNotFoundException $exception) { - } - - return $handler->handle($request); - } -} diff --git a/packages/ep_theme/Classes/Service/EmailService.php b/packages/ep_theme/Classes/Service/EmailService.php deleted file mode 100644 index 180804e..0000000 --- a/packages/ep_theme/Classes/Service/EmailService.php +++ /dev/null @@ -1,102 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use Symfony\Component\Mime\Address; -use TYPO3\CMS\Core\Mail\FluidEmail; -use TYPO3\CMS\Core\Mail\Mailer; -use TYPO3\CMS\Core\SingletonInterface; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; - -class EmailService implements SingletonInterface -{ - /** - * @var array - */ - protected $settings; - - public function __construct(ConfigurationManagerInterface $manager) - { - $settings = GeneralUtility::removeDotsFromTS( - $manager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT) - ); - $this->settings = $settings['plugin']['tx_eptheme']; - } - - /** - * @param string $toEmail - * @param string $toName - * @param string $subject - * @param string $templateName - * @param array $variables - */ - public function send($toEmail, $toName, $subject, $templateName, array $variables = []) - { - /** @var Mailer $mailer */ - $mailer = GeneralUtility::makeInstance(Mailer::class); - $fromEmail = $this->settings['settings']['contactFormToEmail']; - $fromName = $this->settings['settings']['contactFormToName']; - $enableAutoreply = (bool)$this->settings['settings']['enableContactFormAutoreply']; - $autoreplySubject = $this->settings['settings']['contactFormAutoreplySubject']; - - /** @var FluidEmail $message */ - $message = GeneralUtility::makeInstance(FluidEmail::class); - $message - ->to(new Address($toEmail, $toName)) - ->from(new Address($fromEmail, $fromName)) - ->format('html') - ->subject($subject) - ->setTemplate($templateName) - ->assignMultiple($variables) - ; - - $mailer->send($message); - - if ($enableAutoreply) { - $contactForm = $variables['contactForm']; - $toEmail = $contactForm->getEmail(); - $toName = $contactForm->getName(); - $templateName = 'Autoreply'; - - /** @var FluidEmail $message */ - $message = GeneralUtility::makeInstance(FluidEmail::class); - $message - ->to(new Address($toEmail, $toName)) - ->from(new Address($fromEmail, $fromName)) - ->format('html') - ->subject($autoreplySubject) - ->setTemplate($templateName) - ->assignMultiple($variables) - ; - - $mailer->send($message); - } - - return true; - } -} diff --git a/packages/ep_theme/Classes/ViewHelpers/ArgumentPrefixViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/ArgumentPrefixViewHelper.php deleted file mode 100644 index d291df7..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/ArgumentPrefixViewHelper.php +++ /dev/null @@ -1,70 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class ArgumentPrefixViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('pluginName', 'string', 'Plugin name'); - $this->registerArgument('extensionName', 'string', 'Extension name'); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $request = $renderingContext->getControllerContext()->getRequest(); - $pluginName = $arguments['pluginName']; - if ($pluginName === null) { - $pluginName = $request->getPluginName(); - } - $extensionName = $arguments['extensionName']; - if ($extensionName === null) { - $extensionName = $request->getControllerExtensionName(); - } - return strtolower(implode('_', ['tx', $extensionName, $pluginName])); - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/Calendar/ContingentViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Calendar/ContingentViewHelper.php deleted file mode 100644 index bf3a38e..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/Calendar/ContingentViewHelper.php +++ /dev/null @@ -1,201 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use DateInterval; -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class ContingentViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - /** - * @var bool - */ - protected $escapeOutput = false; - - private const LEVEL_GREEN = 1; - private const LEVEL_YELLOW = 2; - private const LEVEL_RED = 3; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('day', \DateTimeInterface::class, 'The day', true); - $this->registerArgument('calendar', 'array', 'The calendar payload', true); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $day = $arguments['day']; - $calendar = $arguments['calendar']; - $now = new \DateTimeImmutable('now'); - $dayDate = new \DateTimeImmutable($day->format('Y-m-d H:i:s'), $day->getTimezone()); - $dayDate = $dayDate->setTime(0, 0, 0); - - if (!empty($calendar['error'])) { - $class = [ 'text-zinc-400' ]; - return static::getHtml($class, $dayDate->format('d')); - } - - if ($now > $dayDate) { - $class = [ 'text-zinc-400' ]; - return static::getHtml($class, $dayDate->format('d')); - } - $statusMap = static::getStatusMap($calendar); - $status = static::normalizeStatus($statusMap[$dayDate->format('Y-m-d')] ?? 'OK'); - $previousStatus = static::normalizeStatus($statusMap[$dayDate->sub(new DateInterval('P1D'))->format('Y-m-d')] ?? 'OK'); - $level = static::getOccupancyLevel($status); - $previousLevel = static::getOccupancyLevel($previousStatus); - - if ($previousLevel !== $level) { - $class = static::getTransientLabelClasses($previousStatus, $status); - } else { - $class = static::getLabelClasses($status); - } - - return static::getHtml($class, $dayDate->format('d')); - } - - /** - * @return array - */ - protected static function getLabelClasses(string $status): array - { - return [ - 'block p-1 leading-none text-sm text-white', - static::getStatusClass($status), - ]; - } - - /** - * @return array - */ - protected static function getTransientLabelClasses(string $statusFrom, ?string $statusTo = null): array - { - $classes = [ 'block p-1 leading-none text-sm text-white' ]; - $class = static::getStatusClass($statusFrom); - if ($statusTo !== null) { - $class .= '-to-' . static::getStatusSuffix($statusTo); - } - $classes[] = $class; - return $classes; - } - - /** - * @return int - */ - protected static function getOccupancyLevel(string $status): int - { - if ($status === 'BLOCKED') { - return static::LEVEL_RED; - } - if ($status === 'ON_REQUEST') { - return static::LEVEL_YELLOW; - } - return static::LEVEL_GREEN; - } - - /** - * @return array - */ - protected static function getStatusMap(array $calendar): array - { - $statusMap = []; - foreach (($calendar['data'] ?? []) as $row) { - if (!isset($row['date'])) { - continue; - } - $statusMap[$row['date']] = static::normalizeStatus((string)($row['status'] ?? 'OK')); - } - - return $statusMap; - } - - protected static function normalizeStatus(string $status): string - { - $status = strtoupper(trim($status)); - if ($status === 'ONREQUEST') { - return 'ON_REQUEST'; - } - - if (in_array($status, [ 'OK', 'ON_REQUEST', 'BLOCKED' ], true)) { - return $status; - } - - return 'OK'; - } - - protected static function getStatusClass(string $status): string - { - if ($status === 'BLOCKED') { - return 'availability-none'; - } - if ($status === 'ON_REQUEST') { - return 'availability-partial'; - } - - return 'availability-full'; - } - - protected static function getStatusSuffix(string $status): string - { - if ($status === 'BLOCKED') { - return 'none'; - } - if ($status === 'ON_REQUEST') { - return 'partial'; - } - - return 'full'; - } - - /** - * @param array $class - * @param string $label - * @return string - */ - protected static function getHtml(array $class, $label) - { - $cssClass = ' class="' . implode(' ', $class) . '"'; - return sprintf('%s', $cssClass, $label); - } -} diff --git a/packages/ep_theme/Classes/ViewHelpers/ComfortCategoryViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/ComfortCategoryViewHelper.php deleted file mode 100644 index d135dcb..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/ComfortCategoryViewHelper.php +++ /dev/null @@ -1,92 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Hotel; -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class ComfortCategoryViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('hotel', Hotel::class, 'The hotel'); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - /** @var Hotel $hotel */ - $hotel = $arguments['hotel']; - - $flag = '%s'; - - switch ($hotel->getCategory()) - { - case Hotel::CATEGORY_STANDARD: - $icon = 'S'; - $tooltip = 'Kategorie: Standard'; - break; - case Hotel::CATEGORY_BASIC: - $icon = 'B'; - $tooltip = 'Kategorie: Basic'; - break; - case Hotel::CATEGORY_COMFORT: - $icon = 'C'; - $tooltip = 'Kategorie: Komfort'; - break; - case Hotel::CATEGORY_DELUXE: - $icon = 'D'; - $tooltip = 'Kategorie: Deluxe'; - break; - case Hotel::CATEGORY_SUPER_DELUXE: - $icon = 'SD'; - $tooltip = 'Kategorie: Superdeluxe'; - break; - default: - return ''; - } - - return sprintf($flag, $tooltip, $icon); - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/ContextClassesViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/ContextClassesViewHelper.php deleted file mode 100644 index bd6b82a..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/ContextClassesViewHelper.php +++ /dev/null @@ -1,71 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class ContextClassesViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('context', 'Array', 'The context', true); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $classes = []; - if (isset($arguments['context']['country'])) { - $classes[] = mb_strtolower($arguments['context']['country']['name']); - } - if (isset($arguments['context']['region'])) { - $classes[] = mb_strtolower($arguments['context']['region']['name']); - } - - $classesString = implode(' ', $classes); - - $classesString = str_replace(['ä', 'ö', 'ü', 'ß'], ['ae', 'oe', 'ue', 'ss'], $classesString); - - return $classesString; - } -} diff --git a/packages/ep_theme/Classes/ViewHelpers/DateRangeViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/DateRangeViewHelper.php deleted file mode 100644 index 94ce30a..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/DateRangeViewHelper.php +++ /dev/null @@ -1,67 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Utility\DateUtility; -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class DateRangeViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('dateFrom', 'string', 'Date range start'); - $this->registerArgument('dateTo', 'string', 'Date range end'); - $this->registerArgument('includeLabel', 'Bool', 'Whether to include a label', false, true); - $this->registerArgument('format', 'String', 'The date format', false, 'd.m.Y'); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) { - return DateUtility::formatDateRange( - $arguments['dateFrom'], - $arguments['dateTo'], - $arguments['includeLabel'], - $arguments['format'] - ); - } -} diff --git a/packages/ep_theme/Classes/ViewHelpers/HotelCategoriesViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/HotelCategoriesViewHelper.php deleted file mode 100644 index 7bcf4f2..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/HotelCategoriesViewHelper.php +++ /dev/null @@ -1,72 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class HotelCategoriesViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('categories', 'array', 'The categories', true); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $categories = $arguments['categories']; - - switch (count($categories)) { - case 1: - $label = reset($categories); - break; - default: - $categoryMinLabel = array_shift($categories); - $categoryMaxLabel = array_pop($categories); - $label = $categoryMinLabel . ' - ' . $categoryMaxLabel; - } - - return $label; - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/HotelCategoryViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/HotelCategoryViewHelper.php deleted file mode 100644 index b6fa565..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/HotelCategoryViewHelper.php +++ /dev/null @@ -1,73 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Domain\Model\Hotel; -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class HotelCategoryViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - /** - * @var array - */ - static protected $categoryLabels = [ - Hotel::CATEGORY_STANDARD => 'Standard', - Hotel::CATEGORY_COMFORT => 'Comfort', - Hotel::CATEGORY_DELUXE => 'Deluxe', - Hotel::CATEGORY_SUPER_DELUXE => 'Super Deluxe', - ]; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('category', 'int', 'The category id', true); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $category = $arguments['category']; - - return static::$categoryLabels[$category]; - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/PriceRangeViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/PriceRangeViewHelper.php deleted file mode 100644 index c38cede..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/PriceRangeViewHelper.php +++ /dev/null @@ -1,66 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class PriceRangeViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('min', 'mixed', 'Price range start'); - $this->registerArgument('max', 'mixed', 'Price range end'); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) { - if (1 === (int) $arguments['min']) { - return sprintf('bis %d €', $arguments['max']); - } - if (999 === (int) $arguments['max']) { - return sprintf('ab %d €', $arguments['min']); - } - - return sprintf('%d bis %d €', $arguments['min'], $arguments['max']); - } -} diff --git a/packages/ep_theme/Classes/ViewHelpers/Stimulus/AbstractStimulusViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Stimulus/AbstractStimulusViewHelper.php deleted file mode 100644 index 27d0c00..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/Stimulus/AbstractStimulusViewHelper.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class AbstractStimulusViewHelper extends AbstractViewHelper -{ - /** - * This method is taken from symfony/webpack-encore-bundle - * - * Normalize a Stimulus controller name into its HTML equivalent (no special character and / becomes --). - * - * @see https://stimulus.hotwire.dev/reference/controllers - */ - protected static function normalizeControllerName(string $str): string - { - return preg_replace('/^@/', '', str_replace('_', '-', str_replace('/', '--', $str))); - } - - /** - * This method is taken from symfony/webpack-encore-bundle - * - * Normalize a Stimulus Value API key into its HTML equivalent ("kebab case"). - * Backport features from symfony/string. - * - * @see https://stimulus.hotwire.dev/reference/values - */ - protected static function normalizeKeyName(string $str): string - { - // Adapted from ByteString::camel - $str = ucfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $str)))); - - // Adapted from ByteString::snake - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1-\2', $str)); - } -} diff --git a/packages/ep_theme/Classes/ViewHelpers/Stimulus/ActionViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Stimulus/ActionViewHelper.php deleted file mode 100644 index 6b9108f..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/Stimulus/ActionViewHelper.php +++ /dev/null @@ -1,88 +0,0 @@ - - */ -class ActionViewHelper extends AbstractStimulusViewHelper -{ - use CompileWithRenderStatic; - - protected $escapeOutput = false; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('controller', 'mixed', 'Controller name(s)', true); - $this->registerArgument('action', 'string', 'Action name', false); - $this->registerArgument('event', 'string', 'Event name', false); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return string - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $dataOrControllerName = $arguments['controller']; - $actionName = $arguments['action']; - $eventName = $arguments['event']; - - if (\is_string($dataOrControllerName)) { - $data = [$dataOrControllerName => null === $eventName ? [[$actionName]] : [[$eventName => $actionName]]]; - } else { - if ($actionName || $eventName) { - throw new \InvalidArgumentException('You cannot pass a string to the second or third argument while passing an array to the first argument of stimulus_action(): check the documentation.'); - } - - $data = $dataOrControllerName; - - if (!$data) { - return ''; - } - } - - $actions = []; - - foreach ($data as $controllerName => $controllerActions) { - $controllerName = static::normalizeControllerName($controllerName); - - if (\is_string($controllerActions)) { - $controllerActions = [[$controllerActions]]; - } - - foreach ($controllerActions as $possibleEventName => $controllerAction) { - if (\is_string($possibleEventName) && \is_string($controllerAction)) { - $controllerAction = [$possibleEventName => $controllerAction]; - } elseif (\is_string($controllerAction)) { - $controllerAction = [$controllerAction]; - } - - foreach ($controllerAction as $eventName => $actionName) { - $action = $controllerName.'#'.htmlspecialchars($actionName, ENT_QUOTES); - - if (\is_string($eventName)) { - $action = $eventName.'->'.$action; - } - - $actions[] = $action; - } - } - } - - return 'data-action="'.implode(' ', $actions).'"'; - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/Stimulus/ControllerViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Stimulus/ControllerViewHelper.php deleted file mode 100644 index 8f517a1..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/Stimulus/ControllerViewHelper.php +++ /dev/null @@ -1,81 +0,0 @@ - - */ -class ControllerViewHelper extends AbstractStimulusViewHelper -{ - use CompileWithRenderStatic; - - protected $escapeOutput = false; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('controller', 'mixed', 'Controller name(s)', true); - $this->registerArgument('values', 'array', 'Controller values', false, []); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return string - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $dataOrControllerName = $arguments['controller']; - $controllerValues = $arguments['values']; - - if (\is_string($dataOrControllerName)) { - $data = [$dataOrControllerName => $controllerValues]; - } else { - if ($controllerValues) { - throw new \InvalidArgumentException('You cannot pass an array to the first and second argument of stimulus_controller(): check the documentation.'); - } - - $data = $dataOrControllerName; - - if (!$data) { - return ''; - } - } - - $controllers = []; - $values = []; - - foreach ($data as $controllerName => $controllerValues) { - $controllerName = static::normalizeControllerName($controllerName); - $controllers[] = $controllerName; - - foreach ($controllerValues as $key => $value) { - if (!is_scalar($value)) { - $value = json_encode($value); - } - - if (\is_bool($value)) { - $value = $value ? 'true' : 'false'; - } - - $key = static::normalizeKeyName($key); - $value = htmlspecialchars($value, ENT_QUOTES); - - $values[] = 'data-'.$controllerName.'-'.$key.'-value="'.$value.'"'; - } - } - - return rtrim('data-controller="'.implode(' ', $controllers).'" '.implode(' ', $values)); - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/Stimulus/TargetViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Stimulus/TargetViewHelper.php deleted file mode 100644 index cbaaeb9..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/Stimulus/TargetViewHelper.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -class TargetViewHelper extends AbstractStimulusViewHelper -{ - use CompileWithRenderStatic; - - protected $escapeOutput = false; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('controller', 'mixed', 'Controller name(s)', true); - $this->registerArgument('targets', 'string', 'Target names', false); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return string - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $dataOrControllerName = $arguments['controller']; - $targetNames = $arguments['target']; - - if (\is_string($dataOrControllerName)) { - $data = [$dataOrControllerName => $targetNames]; - } else { - if ($targetNames) { - throw new \InvalidArgumentException('You cannot pass a string to the second argument while passing an array to the first argument of stimulus_target(): check the documentation.'); - } - - $data = $dataOrControllerName; - - if (!$data) { - return ''; - } - } - - $targets = []; - - foreach ($data as $controllerName => $targetNames) { - $controllerName = static::normalizeControllerName($controllerName); - - $targets['data-'.$controllerName.'-target'] = htmlspecialchars($targetNames, ENT_QUOTES); - } - - return implode(' ', array_map(static function (string $attribute, string $value): string { - return $attribute.'="'.$value.'"'; - }, array_keys($targets), $targets)); - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/Uri/BookingViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Uri/BookingViewHelper.php deleted file mode 100644 index a4fd419..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/Uri/BookingViewHelper.php +++ /dev/null @@ -1,92 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use EP\EpProducts\Utility\BookingUrlUtility; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class BookingViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - /** - * @var array - */ - protected static $settings = []; - - /** - * @param ConfigurationManagerInterface $configurationManager - */ - public function __construct(ConfigurationManagerInterface $configurationManager) - { - $settings = GeneralUtility::removeDotsFromTS( - $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT) - ); - static::$settings = $settings['plugin']['tx_theme']; - } - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('bookingId', 'string', 'The booking id', true); - $this->registerArgument('hotelId', 'string', 'The hotel id', true); - $this->registerArgument('template', 'string', 'The booking template'); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $template = $arguments['template']; - - if ($template === null) { - $template = static::$settings['bpnBookungUrlTemplateCode']; - } - - $options = [ - 'dateId' => $arguments['bookingId'], - 'hotelId' => $arguments['hotelId'], - 'theme' => $template, - ]; - return BookingUrlUtility::generateUrl($options); - } - -} diff --git a/packages/ep_theme/Classes/ViewHelpers/Uri/ExternalImageViewHelper.php b/packages/ep_theme/Classes/ViewHelpers/Uri/ExternalImageViewHelper.php deleted file mode 100644 index b4c02ac..0000000 --- a/packages/ep_theme/Classes/ViewHelpers/Uri/ExternalImageViewHelper.php +++ /dev/null @@ -1,71 +0,0 @@ -, dreipunktnull - * - * All rights reserved - * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ - -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; -use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; -use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; - -class ExternalImageViewHelper extends AbstractViewHelper -{ - use CompileWithRenderStatic; - - /** - * @var bool - */ - protected $escapeOutput = false; - - public function initializeArguments() - { - parent::initializeArguments(); - - $this->registerArgument('url', 'string', 'The url'); - } - - /** - * @param array $arguments - * @param \Closure $renderChildrenClosure - * @param RenderingContextInterface $renderingContext - * @return mixed - */ - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - RenderingContextInterface $renderingContext - ) - { - $url = $renderChildrenClosure(); - if ($url === null) { - $url = $arguments['url']; - } - $encryptionKey = $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']; - $token = sha1($url . $encryptionKey); - return 'https://www.ep-reisen.de/typo3conf/ext/ep_theme/extimg.php?url=' . urlencode($url) . '&token=' . $token; - } - -} diff --git a/packages/ep_theme/Configuration/FlexForms/flexform_disturber.xml b/packages/ep_theme/Configuration/FlexForms/flexform_disturber.xml deleted file mode 100644 index 2fdfd63..0000000 --- a/packages/ep_theme/Configuration/FlexForms/flexform_disturber.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - 1 - - - - - - Konfiguration - - array - - -
1
- array - - - Button - array - - - - - 1 - - - input - trim - 30 - - <_PADDING type="integer">2 - - popup - Link - EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_link.gif - - wizard_link - - wizard - - - height=300,width=500,status=0,menubar=0,scrollbars=1 - - - - - - - - -
-
-
-
-
-
diff --git a/packages/ep_theme/Configuration/RequestMiddlewares.php b/packages/ep_theme/Configuration/RequestMiddlewares.php deleted file mode 100644 index ec4ed8b..0000000 --- a/packages/ep_theme/Configuration/RequestMiddlewares.php +++ /dev/null @@ -1,12 +0,0 @@ - [ - 'ep/referrer' => [ - 'target' => \EP\EpTheme\Middleware\ReferrerMiddleware::class, - 'after' => [ - 'typo3/cms-frontend/site', - ], - ], - ], -]; diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_calendar.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_calendar.php deleted file mode 100644 index a4e84bd..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_calendar.php +++ /dev/null @@ -1,30 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - tx_eptheme_context_hotel, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_contact.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_contact.php deleted file mode 100644 index 90b5ebe..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_contact.php +++ /dev/null @@ -1,44 +0,0 @@ - 0, - 'label' => 'Mitarbeiter', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'tx_epproducts_domain_model_teammember', - 'foreign_table_where' => 'ORDER BY name', - 'minitems' => 1, - 'maxitems' => 1, - ] - ]; - - $GLOBALS['TCA']['tt_content']['types']['contact'] = [ - 'showitem' => ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - tx_eptheme_contact, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_deal_of_the_week.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_deal_of_the_week.php deleted file mode 100644 index c278c7f..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_deal_of_the_week.php +++ /dev/null @@ -1,39 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, header, header_link, bodytext, - --div--;' . $frontendLanguageFilePrefix . 'tabs.appearance, - layout;' . $frontendLanguageFilePrefix . 'layout_formlabel, tx_eptheme_background, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - 'columnsOverrides' => [ - 'bodytext' => [ - 'label' => 'Text', - 'config' => [ - 'rows' => 2, - ] - ], - ] - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_disrupter.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_disrupter.php deleted file mode 100644 index 7edde28..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_disrupter.php +++ /dev/null @@ -1,54 +0,0 @@ - 0, - 'label' => 'Störer', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'tx_eptheme_domain_model_disrupter', - 'foreign_field' => 'tt_content', - 'maxitems' => 1, - 'minitems' => 1, - 'foreign_table_where' => 'ORDER BY headline ASC', - 'MM' => 'tx_eptheme_ttcontent_tx_eptheme_disrupter_mm', - ], - ]; - - $GLOBALS['TCA']['tt_content']['types']['disrupter'] = [ - 'showitem' => ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, tx_eptheme_disrupter, - --div--;' . $frontendLanguageFilePrefix . 'tabs.appearance, - layout;' . $frontendLanguageFilePrefix . 'layout_formlabel, tx_eptheme_background, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - 'columnsOverrides' => [ - ] - ]; - - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - '*', - 'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml', - 'disrupter' - ); - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_disturber.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_disturber.php deleted file mode 100644 index 73824e0..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_disturber.php +++ /dev/null @@ -1,59 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - --palette--;' . $frontendLanguageFilePrefix . 'palette.header;header, bodytext, pi_flexform, - --div--;Bild, - assets, - --div--;' . $frontendLanguageFilePrefix . 'tabs.appearance, - layout;' . $frontendLanguageFilePrefix . 'layout_formlabel, tx_eptheme_background, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - 'columnsOverrides' => [ - 'bodytext' => [ - 'label' => 'Text', - 'config' => [ - 'enableRichtext' => true, - ] - ], - 'assets' => [ - 'label' => 'Bild', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('assets', [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'Hinzufügen' - ], - 'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types'], - 'maxitems' => 1, - 'minitems' => 0, - ], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']) - ] - ] - ]; - - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( - '*', - 'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml', - 'disturber' - ); - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_event_pricetable.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_event_pricetable.php deleted file mode 100644 index 4a23161..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_event_pricetable.php +++ /dev/null @@ -1,30 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - tx_eptheme_context_product, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_faq_overview.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_faq_overview.php deleted file mode 100644 index ff217a3..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_faq_overview.php +++ /dev/null @@ -1,28 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - ]; -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_gmap.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_gmap.php deleted file mode 100644 index d4466b1..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_gmap.php +++ /dev/null @@ -1,30 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - tx_eptheme_context_region, tx_eptheme_context_hotel, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_lineup.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_lineup.php deleted file mode 100644 index 4c38bf5..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_lineup.php +++ /dev/null @@ -1,50 +0,0 @@ - 0, - 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.items', - 'config' => [ - 'type' => 'inline', - 'foreign_table' => 'tx_eptheme_domain_model_lineup', - 'foreign_field' => 'tt_content', - 'foreign_sortby' => 'sorting', - 'maxitems' => 99, - 'appearance' => [ - 'useSortable' => 1, - 'collapseAll' => 1, - 'levelLinksPosition' => 'top', - 'showSynchronizationLink' => 0, - 'showPossibleLocalizationRecords' => 0, - 'showAllLocalizationLink' => 0 - ], - ], - ]; - - $GLOBALS['TCA']['tt_content']['types']['lineup'] = [ - 'showitem' => ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - tx_eptheme_lineup, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_nlform.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_nlform.php deleted file mode 100644 index 5753acd..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_nlform.php +++ /dev/null @@ -1,33 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general', - 'columnsOverrides' => [ - 'header_link' => [ - 'label' => 'YouTube URL/Vimeo ID', - ], - 'layout' => [ - 'label' => 'Typ', - ], - ], - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_ytvideo.php b/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_ytvideo.php deleted file mode 100644 index 6d9230e..0000000 --- a/packages/ep_theme/Configuration/TCA/Overrides/tt_content_element_ytvideo.php +++ /dev/null @@ -1,38 +0,0 @@ - ' - --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, - layout, header_link, - --div--;' . $frontendLanguageFilePrefix . 'tabs.access, - hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, - --div--;' . $frontendLanguageFilePrefix . 'tabs.extended - ', - 'columnsOverrides' => [ - 'header_link' => [ - 'label' => 'YouTube URL/Vimeo ID', - ], - 'layout' => [ - 'label' => 'Typ', - ], - ], - ]; - -}); diff --git a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_addresscheck.php b/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_addresscheck.php deleted file mode 100644 index 304d471..0000000 --- a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_addresscheck.php +++ /dev/null @@ -1,169 +0,0 @@ - [ - 'label' => 'name', - 'label_alt' => 'email', - 'default_sortby' => 'ORDER BY last_name, first_name', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'prependAtCopy' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy', - 'delete' => 'deleted', - 'title' => 'Adresscheck', - 'versioningWS' => true, - 'origUid' => 't3_origuid', - 'enablecolumns' => [ - 'disabled' => 'hidden' - ], - 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', - 'searchFields' => 'name, first_name, last_name, email', - 'dividers2tabs' => 1, - ], - 'columns' => [ - 'pid' => [ - 'label' => 'pid', - 'config' => [ - 'type' => 'passthrough' - ] - ], - 'crdate' => [ - 'label' => 'crdate', - 'config' => [ - 'type' => 'passthrough', - ] - ], - 'cruser_id' => [ - 'label' => 'cruser_id', - 'config' => [ - 'type' => 'passthrough' - ] - ], - 'tstamp' => [ - 'label' => 'tstamp', - 'config' => [ - 'type' => 'passthrough', - ] - ], - 'hidden' => [ - 'exclude' => 1, - 'label' => 'Versteckt', - 'config' => [ - 'type' => 'check' - ] - ], - 'customer_id' => [ - 'exclude' => 1, - 'label' => 'Kundennummer', - 'config' => [ - 'type' => 'input', - 'size' => '8', - 'eval' => 'trim', - 'max' => '255' - ] - ], - 'title' => [ - 'exclude' => 1, - 'label' => 'Anrede', - 'config' => [ - 'type' => 'input', - 'size' => '8', - 'eval' => 'trim', - 'max' => '255' - ] - ], - 'first_name' => [ - 'exclude' => 0, - 'label' => 'Vorname', - 'config' => [ - 'type' => 'input', - 'size' => '20', - 'eval' => 'trim', - 'max' => '255' - ] - ], - 'last_name' => [ - 'exclude' => 0, - 'label' => 'Name', - 'config' => [ - 'type' => 'input', - 'size' => '20', - 'eval' => 'trim', - 'max' => '255' - ] - ], - 'address' => [ - 'label' => 'Strasse / Nr.', - 'config' => [ - 'type' => 'text', - 'cols' => '20', - 'rows' => '3' - ] - ], - 'email' => [ - 'label' => 'E-Mail', - 'config' => [ - 'type' => 'input', - 'size' => '20', - 'eval' => 'trim', - 'max' => '255', - 'softref' => 'email' - ] - ], - 'city' => [ - 'label' => 'Stadt', - 'config' => [ - 'type' => 'input', - 'size' => '20', - 'eval' => 'trim', - 'max' => '255' - ] - ], - 'zip' => [ - 'label' => 'PLZ', - 'config' => [ - 'type' => 'input', - 'eval' => 'trim', - 'size' => '10', - 'max' => '20' - ] - ], - 'country' => [ - 'exclude' => 1, - 'label' => 'Land', - 'config' => [ - 'type' => 'input', - 'size' => '20', - 'eval' => 'trim', - 'max' => '128' - ] - ], - 'no_postal' => [ - 'exclude' => 1, - 'label' => 'Keine Postalische Werbung', - 'config' => [ - 'type' => 'check' - ] - ], - 'no_email' => [ - 'exclude' => 1, - 'label' => 'Keine E-Mails mehr', - 'config' => [ - 'type' => 'check' - ] - ], - 'address_current' => [ - 'exclude' => 1, - 'label' => 'Adresse ist aktuell', - 'config' => [ - 'type' => 'check' - ] - ], - ], - 'types' => [ - '0' => ['showitem' => - 'hidden, - title,first_name,last_name,address,zip,city,country,email,no_postal,no_email,address_current, - '] - ], -]; diff --git a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_disrupter.php b/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_disrupter.php deleted file mode 100644 index 2caaca6..0000000 --- a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_disrupter.php +++ /dev/null @@ -1,211 +0,0 @@ - [ - 'title' => 'Störer', - 'default_sortby' => 'ORDER BY headline', - 'label' => 'headline', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - 'versioningWS' => true, - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'headline,text', - 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', - ], - 'types' => [ - '1' => [ - 'showitem' => 'sys_language_uid, hidden, layout, headline, text, image, pi_flexform', - ], - ], - 'palettes' => [ - ], - 'columns' => [ - - '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] - ], - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_eptheme_domain_model_disrupter', - 'foreign_table_where' => 'AND tx_eptheme_domain_model_disrupter.pid=###CURRENT_PID### AND tx_eptheme_domain_model_disrupter.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], - - 'hidden' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - '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', - 'size' => 13, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'behaviour' => [ - 'allowLanguageSynchronization' => true, - ], - 'renderType' => 'inputDateTime', - ], - ], - - 'headline' => [ - 'exclude' => 0, - 'label' => 'Headline', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'layout' => [ - 'exclude' => 0, - 'label' => 'Layout', - 'config' => [ - 'type' => 'selectSingle', - 'items' => [ - ['klein', 0], - ['groß', 1], - ['Event klein', 2], - ['Event groß', 3], - ], - ], - ], - 'text' => [ - 'exclude' => 0, - 'label' => 'Text', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 5, - 'eval' => 'trim', - 'enableRichtext' => true, - ], - ], - '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', - 'fileUploadAllowed' => false, - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - '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' => [ - 'square' => [ - 'title' => 'quadratisch', - 'value' => 1, - ], - 'free' => [ - 'title' => 'Frei', - 'value' => 'NaN', - ], - ], - ], - ], - ], - ], - ], - ], - 'maxitems' => 1, - 'minitems' => 1, - ], - 'jpg,jpeg' - ), - ], - 'pi_flexform' => [ - 'exclude' => 0, - 'label' => 'Buttons', - 'config' => [ - 'type' => 'flex', - 'ds' => [ - 'default' => 'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml', - ], - ] - ], - 'tt_content' => [ - 'exclude' => 0, - 'config' => [ - 'type' => 'passthrough', - ], - ], - ], -]; diff --git a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_lineup.php b/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_lineup.php deleted file mode 100644 index 7beb66d..0000000 --- a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_lineup.php +++ /dev/null @@ -1,224 +0,0 @@ - [ - 'title' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup', - 'default_sortby' => 'ORDER BY name', - 'label' => 'name', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - 'versioningWS' => true, - 'hideTable' => true, - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'headline,subline', - 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', - ], - 'types' => [ - '1' => [ - 'showitem' => 'hidden, name, description, image, --palette--;;social', - ], - ], - 'palettes' => [ - 'social' => ['showitem' => 'facebook_url, twitter_url, youtube_url, instagram_url, soundcloud_url'], - ], - 'columns' => [ - - '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] - ], - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_eptheme_domain_model_lineup', - 'foreign_table_where' => 'AND tx_eptheme_domain_model_lineup.pid=###CURRENT_PID### AND tx_eptheme_domain_model_lineup.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - - 't3ver_label' => [ - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ] - ], - - 'hidden' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - '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', - 'size' => 13, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'behaviour' => [ - 'allowLanguageSynchronization' => true, - ], - 'renderType' => 'inputDateTime', - ], - ], - 'sorting' => [ - 'config' => [ - 'type' => 'passthrough' - ], - ], - - 'name' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.name', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required' - ], - ], - 'description' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_domain_model_lineup.description', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 10, - 'eval' => 'trim', - 'enableRichtext' => true, - ], - ], - 'image' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.image', - 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( - 'image', - [ - 'appearance' => [ - 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference', - 'useSortable' => false, - ], - 'overrideChildTca' => [ - 'types' => [ - \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ - 'showitem' => ' - --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, - --palette--;;filePalette', - ], - ], - ], - 'maxitems' => 1 - ], - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ), - ], - 'facebook_url' => [ - 'exclude' => 0, - 'label' => 'Facebook URL', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'twitter_url' => [ - 'exclude' => 0, - 'label' => 'Twitter URL', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'instagram_url' => [ - 'exclude' => 0, - 'label' => 'Instagram URL', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'youtube_url' => [ - 'exclude' => 0, - 'label' => 'YouTube URL', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'soundcloud_url' => [ - 'exclude' => 0, - 'label' => 'Soundcloud URL', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ], - 'tt_content' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.tt_content', - 'config' => [ - 'type' => 'select', - 'default' => 0, - 'renderType' => 'selectSingle', - 'foreign_table' => 'tt_content', - 'minitems' => 0, - 'maxitems' => 1, - ], - ], - ], -]; diff --git a/packages/ep_theme/Configuration/TSconfig/Page/Extensions/GridElements.tsconfig b/packages/ep_theme/Configuration/TSconfig/Page/Extensions/GridElements.tsconfig deleted file mode 100644 index f2b6a0c..0000000 --- a/packages/ep_theme/Configuration/TSconfig/Page/Extensions/GridElements.tsconfig +++ /dev/null @@ -1,180 +0,0 @@ -tx_gridelements.setup { - quarters { - title = Teaserreihe vierspaltig (25%/25%/25%/25%) - topLevelLayout = 1 - icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_quarters.png - config { - colCount = 4 - rowCount = 1 - rows { - 1 { - columns { - 1 { - name = Spalte 1 - colPos = 41 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 2 { - name = Spalte 2 - colPos = 42 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 3 { - name = Spalte 3 - colPos = 43 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 4 { - name = Spalte 4 - colPos = 44 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - } - } - } - } - } - thirds { - title = Teaserreihe dreispaltig (33%/33%/33%) - topLevelLayout = 1 - icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_thirds.png - config { - colCount = 3 - rowCount = 1 - rows { - 1 { - columns { - 1 { - name = Spalte 1 - colPos = 31 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 2 { - name = Spalte 2 - colPos = 32 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 3 { - name = Spalte 3 - colPos = 33 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - } - } - } - } - } - halves { - title = Teaserreihe zweispaltig (50%/50%) - topLevelLayout = 1 - icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_halves.png - config { - colCount = 2 - rowCount = 1 - rows { - 1 { - columns { - 1 { - name = Spalte 1 - colPos = 21 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 2 { - name = Spalte 2 - colPos = 22 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - } - } - } - } - } - halfAndTwoQuarters { - title = Teaserreihe dreispaltig (50%/25%/25%) - topLevelLayout = 1 - icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_half_and_two_quarters.png - config { - colCount = 4 - rowCount = 1 - rows { - 1 { - columns { - 1 { - name = Spalte 1 - colPos = 51 - colspan = 2 - allowed = textmedia,teaser,list,form_formframework - } - 2 { - name = Spalte 2 - colPos = 52 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 3 { - name = Spalte 3 - colPos = 53 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - } - } - } - } - } - twoQuartersAndHalf { - title = Teaserreihe dreispaltig (25%/25%/50%) - topLevelLayout = 1 - icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_two_quarters_and_half.png - config { - colCount = 4 - rowCount = 1 - rows { - 1 { - columns { - 1 { - name = Spalte 1 - colPos = 61 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 2 { - name = Spalte 2 - colPos = 62 - disallowed { - CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages - } - } - 3 { - name = Spalte 3 - colPos = 63 - colspan = 2 - allowed = textmedia,teaser,list,gmap,nlform,form_formframework,menu_pages,menu_subpages,menu_section - } - } - } - } - } - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/calendar.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/calendar.typoscript deleted file mode 100644 index 1684e49..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/calendar.typoscript +++ /dev/null @@ -1,14 +0,0 @@ -tt_content.calendar =< lib.contentElement -tt_content.calendar { - templateName = Calendar - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor - 10 { - table = tx_epproducts_domain_model_hotel - where.data = field:tx_eptheme_context_hotel - where.wrap = uid=| - pidInList = 5 - as = hotel - } - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/contact.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/contact.typoscript deleted file mode 100644 index 919d6b7..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/contact.typoscript +++ /dev/null @@ -1,23 +0,0 @@ -tt_content.contact =< lib.contentElement -tt_content.contact { - templateName = Contact - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor - 10 { - table = tx_epproducts_domain_model_teammember - where.data = field:tx_eptheme_contact - where.wrap = uid=| - pidInList = {$plugin.tx_eptheme.settings.teamMemberStoragePid} - as = contact - - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor - 10 { - references.fieldName = image - references.table = tx_epproducts_domain_model_teammember - as = image - } - } - } - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/disrupter.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/disrupter.typoscript deleted file mode 100644 index cffda85..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/disrupter.typoscript +++ /dev/null @@ -1,28 +0,0 @@ -tt_content.disrupter =< lib.contentElement -tt_content.disrupter { - templateName = Disrupter - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor - 10 { - table = tx_eptheme_domain_model_disrupter - pidInList = {$plugin.tx_eptheme.settings.disrupterStoragePid} - join = tx_eptheme_ttcontent_tx_eptheme_disrupter_mm ON tx_eptheme_ttcontent_tx_eptheme_disrupter_mm.uid_foreign = tx_eptheme_domain_model_disrupter.uid - where { - data = field:uid - intval = 1 - wrap = tx_eptheme_ttcontent_tx_eptheme_disrupter_mm.uid_local=| - } - as = disrupter - - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor - 10 { - references.fieldName = image - references.table = tx_eptheme_domain_model_disrupter - as = image - } - 20 = EP\EpTheme\DataProcessing\FlexFormProcessor - } - } - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/disturber.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/disturber.typoscript deleted file mode 100644 index d32d0a3..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/disturber.typoscript +++ /dev/null @@ -1,13 +0,0 @@ -tt_content.deal_of_the_week =< lib.contentElement -tt_content.deal_of_the_week { - templateName = DealOfTheWeek -} - -tt_content.disturber =< lib.contentElement -tt_content.disturber { - templateName = Disturber - dataProcessing { - 10 = EP\EpTheme\DataProcessing\TeaserImageProcessor - 20 = EP\EpTheme\DataProcessing\FlexFormProcessor - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/event_pricetable.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/event_pricetable.typoscript deleted file mode 100644 index 94dccc4..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/event_pricetable.typoscript +++ /dev/null @@ -1,10 +0,0 @@ -tt_content.event_pricetable =< lib.contentElement -tt_content.event_pricetable { - templateName = EventPricetable - variables { - forcePartnerIdSelect = TEXT - forcePartnerIdSelect.value = {$plugin.tx_eptheme.settings.forcePartnerIdSelect} - partnerIdSelectLabel = TEXT - partnerIdSelectLabel.value = {$plugin.tx_eptheme.settings.partnerIdSelectLabel} - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/faq_overview.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/faq_overview.typoscript deleted file mode 100644 index a2496dc..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/faq_overview.typoscript +++ /dev/null @@ -1,17 +0,0 @@ -tt_content.faq_overview =< lib.contentElement -tt_content.faq_overview { - templateName = FaqOverview - settings { - infoPageUid = {$plugin.tx_eptheme.settings.infoPageUid} - } - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor - 10 { - table = tx_epproducts_domain_model_faq - where = category != '' - orderBy = category ASC, uid ASC - pidInList = {$plugin.tx_epproducts.settings.faqsStoragePid} - as = faqs - } - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/gmap.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/gmap.typoscript deleted file mode 100644 index c141099..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/gmap.typoscript +++ /dev/null @@ -1,23 +0,0 @@ -tt_content.gmap =< tt_content.teaser_product -tt_content.gmap { - templateName = Gmap - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor - 10 { - table = tx_epproducts_domain_model_hotel - where.data = field:tx_eptheme_context_hotel - where.wrap = uid=| - pidInList = {$plugin.tx_epproducts.settings.hotelsStoragePid} - as = hotel - } - 20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor - 20 { - table = tx_epproducts_domain_model_region - where.data = field:tx_eptheme_context_region - where.wrap = uid=| - pidInList = {$plugin.tx_epproducts.settings.destinationsStoragePid} - recursive = 2 - as = region - } - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/lineup.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/lineup.typoscript deleted file mode 100644 index f5b0872..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/lineup.typoscript +++ /dev/null @@ -1,24 +0,0 @@ -tt_content.lineup =< lib.contentElement -tt_content.lineup { - templateName = Lineup - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor - 10 { - table = tx_eptheme_domain_model_lineup - where.data = field:uid - where.wrap = tt_content=| - orderBy = sorting - as = items - - dataProcessing { - 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor - 10 { - references.fieldName = image - references.table = tx_eptheme_domain_model_lineup - as = image - } - } - } - } -} - diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/nlform.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/nlform.typoscript deleted file mode 100644 index 6e80f8b..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/nlform.typoscript +++ /dev/null @@ -1,9 +0,0 @@ -tt_content.nlform =< lib.contentElement -tt_content.nlform { - templateName = NewsletterForm - variables { - formUrl = TEXT - formUrl.wrap = |/buchung/anmeldung_news.php - formUrl.data = site:base - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/ContentElements/ytvideo.typoscript b/packages/ep_theme/Configuration/TypoScript/ContentElements/ytvideo.typoscript deleted file mode 100644 index 2107bc1..0000000 --- a/packages/ep_theme/Configuration/TypoScript/ContentElements/ytvideo.typoscript +++ /dev/null @@ -1,4 +0,0 @@ -tt_content.ytvideo =< lib.contentElement -tt_content.ytvideo { - templateName = YoutubeVideo -} diff --git a/packages/ep_theme/Configuration/TypoScript/Extensions/Form.typoscript b/packages/ep_theme/Configuration/TypoScript/Extensions/Form.typoscript deleted file mode 100644 index 339880c..0000000 --- a/packages/ep_theme/Configuration/TypoScript/Extensions/Form.typoscript +++ /dev/null @@ -1,30 +0,0 @@ -@import 'EXT:form/Configuration/TypoScript/setup.typoscript' -@import 'EXT:form_element_linked_checkbox/Configuration/TypoScript/setup.typoscript' -@import 'EXT:bw_captcha/Configuration/TypoScript/setup.typoscript' - -plugin.tx_form.view { - templateRootPaths.10 = EXT:ep_theme/Resources/Private/Templates/Form/ -} - -plugin.tx_form.settings.yamlConfigurations { - 1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml - 1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersFrontend.yaml -} - -module.tx_form.settings.yamlConfigurations { - 1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml - 1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersBackend.yaml -} - -plugin.tx_bwcaptcha.settings { - charset = abcdefghjkmnpqrtuvwxy34679 - length = 4 - width = 220 - height = 60 -} - -# Requests with a malformed type (e.g. ?type=03413) bypass the bw_captcha middleware's -# strict string check and get rendered as this empty PAGE. If it were cacheable, genuine -# ?type=3413 requests would hit that cache entry, TypoScript would never be parsed and -# the middleware would crash on empty settings. -captcha.config.no_cache = 1 diff --git a/packages/ep_theme/Configuration/TypoScript/Extensions/GridElements.typoscript b/packages/ep_theme/Configuration/TypoScript/Extensions/GridElements.typoscript deleted file mode 100644 index f118b41..0000000 --- a/packages/ep_theme/Configuration/TypoScript/Extensions/GridElements.typoscript +++ /dev/null @@ -1,20 +0,0 @@ -@import 'EXT:gridelements/Configuration/TypoScript/setup.typoscript' - -tt_content.gridelements_pi1.20.10.setup { - quarters < lib.gridelements.defaultGridSetup - quarters { - cObject = FLUIDTEMPLATE - cObject { - templateName = Quarters - templateRootPaths.0 = EXT:ep_theme/Resources/Private/Templates/Gridelements/ - layoutRootPaths.0 = EXT:ep_theme/Resources/Private/Layouts/Gridelements/ - partialRootPaths.0 = EXT:ep_theme/Resources/Private/Partials/ - } - } - thirds < .quarters - thirds.cObject.templateName = Thirds - halves < .quarters - halves.cObject.templateName = Halves - halfAndTwoQuarters < .quarters - halfAndTwoQuarters.cObject.templateName = HalfAndTwoQuarters -} diff --git a/packages/ep_theme/Configuration/TypoScript/Extensions/News.typoscript b/packages/ep_theme/Configuration/TypoScript/Extensions/News.typoscript deleted file mode 100644 index 52a7989..0000000 --- a/packages/ep_theme/Configuration/TypoScript/Extensions/News.typoscript +++ /dev/null @@ -1,13 +0,0 @@ -@import 'EXT:news/Configuration/TypoScript/setup.txt' - -plugin.tx_news { - view { - layoutRootPaths.100 = EXT:ep_theme/Resources/Private/Layouts/News/ - templateRootPaths.100 = EXT:ep_theme/Resources/Private/Templates/News/ - partialRootPaths.100 = EXT:ep_theme/Resources/Private/Partials/News/ - widget.GeorgRinger\News\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = EXT:ep_theme/Resources/Private/Templates/News/ - } - settings { - tagListPageUid = {$plugin.tx_eptheme.settings.blogTagListPageUid} - } -} diff --git a/packages/ep_theme/Configuration/TypoScript/Page/Export.typoscript b/packages/ep_theme/Configuration/TypoScript/Page/Export.typoscript deleted file mode 100644 index 333c2a3..0000000 --- a/packages/ep_theme/Configuration/TypoScript/Page/Export.typoscript +++ /dev/null @@ -1,25 +0,0 @@ -xmlExport = PAGE -xmlExport { - typeNum = 1972 - config { - xhtml_cleaning = none - disableAllHeaderCode = 1 - additionalHeaders = Content-Type: text/xml; charset=utf-8 - simulateStaticDocuments = 0 - admPanel = 0 - debug = 0 - tx_realurl_enable = 1 - } - 10 = USER_INT - 10 { - userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run - extensionName = EpProducts - pluginName = reseller - vendorName = EP - switchableControllerActions { - Reseller { - 1 = xml - } - } - } -} diff --git a/packages/ep_theme/Configuration/Yaml/BaseSetup.yaml b/packages/ep_theme/Configuration/Yaml/BaseSetup.yaml deleted file mode 100644 index 79da447..0000000 --- a/packages/ep_theme/Configuration/Yaml/BaseSetup.yaml +++ /dev/null @@ -1,39 +0,0 @@ -TYPO3: - CMS: - Form: - persistenceManager: - allowedExtensionPaths: - 10: EXT:ep_theme/Resources/Private/Forms/ - - prototypes: - standard: - - formElementsDefinition: - Form: - renderingOptions: - templateRootPaths: - 1505042810: 'EXT:ep_theme/Resources/Private/Templates/Form/' - partialRootPaths: - 1623227657: 'EXT:ep_theme/Resources/Private/Partials/Form/' - layoutRootPaths: - 1505042810: 'EXT:ep_theme/Resources/Private/Layouts/Form/' - honeypot: - enable: false - - finishersDefinition: - BpnApiFinisher: - implementationClassName: 'EP\EpTheme\Form\BpnApiFinisher' - ApplicationApiFinisher: - implementationClassName: 'EP\EpTheme\Form\ApplicationApiFinisher' - WebhookFinisher: - implementationClassName: 'EP\EpTheme\Form\WebhookFinisher' - AddReferrerFinisher: - implementationClassName: 'EP\EpTheme\Form\AddReferrerFinisher' - - contactform: - __inheritances: - 10: 'TYPO3.CMS.Form.prototypes.standard' - - applicationform: - __inheritances: - 10: 'TYPO3.CMS.Form.prototypes.standard' diff --git a/packages/ep_theme/Configuration/Yaml/FormEditorSetup.yaml b/packages/ep_theme/Configuration/Yaml/FormEditorSetup.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/packages/ep_theme/Configuration/Yaml/FormEngineSetup.yaml b/packages/ep_theme/Configuration/Yaml/FormEngineSetup.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/packages/ep_theme/Configuration/Yaml/FormFinishersBackend.yaml b/packages/ep_theme/Configuration/Yaml/FormFinishersBackend.yaml deleted file mode 100644 index 25d8745..0000000 --- a/packages/ep_theme/Configuration/Yaml/FormFinishersBackend.yaml +++ /dev/null @@ -1,111 +0,0 @@ -TYPO3: - CMS: - Form: - prototypes: - standard: - formElementsDefinition: - Form: - formEditor: - editors: - 900: - selectOptions: - 1000: - value: 'BpnApiFinisher' - label: 'BusPro Finisher' - 1010: - value: 'ApplicationApiFinisher' - label: 'Application Finisher' - 1050: - value: 'WebhookFinisher' - label: 'Webhook Finisher' - 1100: - value: 'AddReferrerFinisher' - label: 'Referrer Finisher' - propertyCollections: - finishers: - 1000: - identifier: 'BpnApiFinisher' - editors: - __inheritances: - 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin' - 100: - label: 'BusPro Finisher' - 110: - identifier: 'mapping' - templateName: 'Inspector-TextEditor' - label: 'Mapping' - propertyPath: 'options.mapping' - propertyValidators: - 10: 'NotEmpty' - 1010: - identifier: 'ApplicationApiFinisher' - editors: - __inheritances: - 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin' - 100: - label: 'Application Finisher' - 110: - identifier: 'mapping' - templateName: 'Inspector-TextEditor' - label: 'Mapping' - propertyPath: 'options.mapping' - propertyValidators: - 10: 'NotEmpty' - 120: - identifier: 'exclude' - templateName: 'Inspector-TextEditor' - label: 'Exclude' - propertyPath: 'options.exclude' - 1050: - identifier: 'WebhookFinisher' - editors: - __inheritances: - 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin' - 100: - label: 'Webhook Finisher' - 110: - identifier: 'mapping' - templateName: 'Inspector-TextEditor' - label: 'Mapping' - propertyPath: 'options.mapping' - propertyValidators: - 10: 'NotEmpty' - 120: - identifier: 'url' - templateName: 'Inspector-TextEditor' - label: 'URL' - propertyPath: 'options.url' - propertyValidators: - 10: 'NotEmpty' - 1100: - identifier: 'AddReferrerFinisher' - editors: - __inheritances: - 10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin' - 100: - label: 'Referrer Finisher' - - finishersDefinition: - BpnApiFinisher: - formEditor: - iconIdentifier: 'form-finisher' - predefinedDefaults: - options: - mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1' - ApplicationApiFinisher: - formEditor: - iconIdentifier: 'form-finisher' - predefinedDefaults: - options: - mapping: 'firstName:text-1,lastName:text-2,email:email-1,phone:telephone-1' - exclude: 'captcha,privacypolicyaccepted' - WebhookFinisher: - formEditor: - iconIdentifier: 'form-finisher' - predefinedDefaults: - options: - mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1' - url: '' - AddReferrerFinisher: - formEditor: - iconIdentifier: 'form-finisher' diff --git a/packages/ep_theme/Configuration/Yaml/FormFinishersFrontend.yaml b/packages/ep_theme/Configuration/Yaml/FormFinishersFrontend.yaml deleted file mode 100644 index fbd9d99..0000000 --- a/packages/ep_theme/Configuration/Yaml/FormFinishersFrontend.yaml +++ /dev/null @@ -1,35 +0,0 @@ -TYPO3: - CMS: - Form: - prototypes: - standard: - finishersDefinition: - BpnApiFinisher: - implementationClassName: 'EP\EpTheme\Form\BpnApiFinisher' - formEditor: - label: 'BusPro Finisher' - options: - identifier: 'BpnApiFinisher' - mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1' - ApplicationApiFinisher: - implementationClassName: 'EP\EpTheme\Form\ApplicationApiFinisher' - formEditor: - label: 'Application Finisher' - options: - identifier: 'ApplicationApiFinisher' - mapping: 'firstName:text-1,lastName:text-2,email:email-1,phone:telephone-1' - exclude: 'captcha,privacypolicyaccepted' - WebhookFinisher: - implementationClassName: 'EP\EpTheme\Form\WebhookFinisher' - formEditor: - label: 'Webhook Finisher' - options: - identifier: 'WebhookFinisher' - mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1' - url: '' - AddReferrerFinisher: - implementationClassName: 'EP\EpTheme\Form\AddReferrerFinisher' - formEditor: - label: 'Referrer Finisher' - options: - identifier: 'AddReferrerFinisher' diff --git a/packages/ep_theme/Configuration/Yaml/FormsBase.yaml b/packages/ep_theme/Configuration/Yaml/FormsBase.yaml deleted file mode 100644 index f7d0c3f..0000000 --- a/packages/ep_theme/Configuration/Yaml/FormsBase.yaml +++ /dev/null @@ -1,42 +0,0 @@ -TYPO3: - CMS: - Form: - persistenceManager: - allowedExtensionPaths: - 10: EXT:ep_theme/Resources/Private/Forms/ - prototypes: - standard: - formEditor: - formElementGroups: - input: - label: Basiselemente - html5: - label: HTML5-Elemente - select: - label: Auswahlelemente - custom: - label: Sonstiges - formElementsDefinition: - AdvancedPassword: null - DatePicker: null - Fieldset: null - GridRow: null - Hidden: null - ImageUpload: null - Password: null - Form: - renderingOptions: - templateRootPaths: - 1505042810: 'EXT:ep_theme/Resources/Private/Templates/Form/' - partialRootPaths: - 1623227657: 'EXT:ep_theme/Resources/Private/Partials/Form/' - layoutRootPaths: - 1505042810: 'EXT:ep_theme/Resources/Private/Layouts/Form/' - honeypot: - enable: false - contactform: - __inheritances: - 10: 'TYPO3.CMS.Form.prototypes.standard' - applicationform: - __inheritances: - 10: 'TYPO3.CMS.Form.prototypes.standard' diff --git a/packages/ep_theme/Resources/Private/Forms/AdresscheckForm.form.yaml b/packages/ep_theme/Resources/Private/Forms/AdresscheckForm.form.yaml deleted file mode 100644 index f7241ed..0000000 --- a/packages/ep_theme/Resources/Private/Forms/AdresscheckForm.form.yaml +++ /dev/null @@ -1,144 +0,0 @@ - -renderingOptions: - submitButtonLabel: Absenden -type: Form -identifier: adresscheck-ext -label: Adresscheck (EXT) -prototypeName: standard -finishers: -- - options: - subject: Adresscheck - recipientAddress: 'info@ep-reisen.de' - recipientName: 'E&P Reisen' - senderAddress: smtprelay@ep-reisen.de - senderName: 'E&P Reisen' - replyToAddress: '' - carbonCopyAddress: '' - blindCarbonCopyAddress: '' - format: html - attachUploads: false - translation: - language: '' - identifier: EmailToReceiver -- - identifier: SaveToDatabase - options: - - - table: 'tx_eptheme_domain_model_addresscheck' - mode: insert - databaseColumnMappings: - pid: - value: 1228 - elements: - customer-id: - mapOnDatabaseColumn: 'customer_id' - title: - mapOnDatabaseColumn: 'title' - first-name: - mapOnDatabaseColumn: 'first_name' - last-name: - mapOnDatabaseColumn: 'last_name' - address: - mapOnDatabaseColumn: 'address' - zip: - mapOnDatabaseColumn: 'zip' - city: - mapOnDatabaseColumn: 'city' - country: - mapOnDatabaseColumn: 'country' - email: - mapOnDatabaseColumn: 'email' - no-postal: - mapOnDatabaseColumn: 'no_postal' - no-email: - mapOnDatabaseColumn: 'no_email' - address-is-current-postal: - mapOnDatabaseColumn: 'address_current' -- - options: - pageUid: '1606' - additionalParameters: '' - identifier: Redirect -renderables: -- - renderingOptions: - previousButtonLabel: '' - nextButtonLabel: '' - type: Page - identifier: page-1 - label: '' - renderables: - - - defaultValue: '' - type: Hidden - identifier: customer-id - label: KundenID - - - defaultValue: '' - type: Text - identifier: title - label: Anrede - - - defaultValue: '' - type: Text - identifier: first-name - label: Vorname - properties: - fluidAdditionalAttributes: - required: required - - - defaultValue: '' - type: Text - identifier: last-name - label: Name - properties: - fluidAdditionalAttributes: - required: required - - - defaultValue: '' - type: Text - identifier: address - label: 'Straße & Hausnummer' - properties: - elementDescription: '' - - - defaultValue: '' - type: Text - identifier: zip - label: PLZ - - - defaultValue: '' - type: Text - identifier: city - label: Stadt - - - defaultValue: '' - type: Text - identifier: country - label: Land - - - defaultValue: '' - type: Text - identifier: email - label: E-Mail - properties: - fluidAdditionalAttributes: - required: required - validators: - - - identifier: NotEmpty - - - identifier: EmailAddress - - - type: Checkbox - identifier: no-postal - label: 'Postalische Werbung abbestellen' - - - type: Checkbox - identifier: no-email - label: 'Ich möchte keine Mails mehr erhalten.' - - - type: Checkbox - identifier: address-is-current - label: 'Meine Adresse ist aktuell.' diff --git a/packages/ep_theme/Resources/Private/Forms/AdresscheckRemove.form.yaml b/packages/ep_theme/Resources/Private/Forms/AdresscheckRemove.form.yaml deleted file mode 100644 index f3d8627..0000000 --- a/packages/ep_theme/Resources/Private/Forms/AdresscheckRemove.form.yaml +++ /dev/null @@ -1,118 +0,0 @@ - -renderingOptions: - submitButtonLabel: aus Mailingliste entfernen -type: Form -identifier: adresscheck-remove-ext -label: Adresscheck aus Datenbank entfernen (EXT) -prototypeName: standard -finishers: -- - options: - subject: 'Adresscheck - aus Datenbank entfernen' - recipientAddress: 'info@ep-reisen.de' - recipientName: 'E&P Reisen' - senderAddress: smtprelay@ep-reisen.de - senderName: 'E&P Reisen' - replyToAddress: '' - carbonCopyAddress: '' - blindCarbonCopyAddress: '' - format: html - attachUploads: false - translation: - language: '' - identifier: EmailToReceiver -- - identifier: SaveToDatabase - options: - - - table: 'tx_eptheme_domain_model_addresscheck' - mode: insert - databaseColumnMappings: - pid: - value: 1609 - elements: - customer-id: - mapOnDatabaseColumn: 'customer_id' - title: - mapOnDatabaseColumn: 'title' - first-name: - mapOnDatabaseColumn: 'first_name' - last-name: - mapOnDatabaseColumn: 'last_name' - address: - mapOnDatabaseColumn: 'address' - zip: - mapOnDatabaseColumn: 'zip' - city: - mapOnDatabaseColumn: 'city' - country: - mapOnDatabaseColumn: 'country' - email: - mapOnDatabaseColumn: 'email' - no-postal: - mapOnDatabaseColumn: 'no_postal' - no-email: - mapOnDatabaseColumn: 'no_email' - address-is-current-postal: - mapOnDatabaseColumn: 'address_current' -- - options: - pageUid: '1610' - additionalParameters: '' - identifier: Redirect -renderables: -- - renderingOptions: - previousButtonLabel: '' - nextButtonLabel: '' - type: Page - identifier: page-1 - label: '' - renderables: - - - defaultValue: '' - type: Hidden - identifier: customer-id - label: KundenID - - - defaultValue: '' - type: Hidden - identifier: title - label: Anrede - - - defaultValue: '' - type: Hidden - identifier: first-name - label: Vorname - - - defaultValue: '' - type: Hidden - identifier: last-name - label: Name - - - defaultValue: '' - type: Hidden - identifier: address - label: 'Straße & Hausnummer' - properties: - elementDescription: '' - - - defaultValue: '' - type: Hidden - identifier: zip - label: PLZ - - - defaultValue: '' - type: Hidden - identifier: city - label: Stadt - - - defaultValue: '' - type: Hidden - identifier: country - label: Land - - - defaultValue: '' - type: Hidden - identifier: email - label: E-Mail diff --git a/packages/ep_theme/Resources/Private/Forms/ApplicationForm.form.yaml b/packages/ep_theme/Resources/Private/Forms/ApplicationForm.form.yaml deleted file mode 100644 index be73b78..0000000 --- a/packages/ep_theme/Resources/Private/Forms/ApplicationForm.form.yaml +++ /dev/null @@ -1,378 +0,0 @@ - -renderingOptions: - submitButtonLabel: Absenden -type: Form -identifier: applicationform -label: Bewerbungsformular -prototypeName: applicationform -finishers: - - - options: - subject: 'Bewerbung von {text-1}' - recipientAddress: team@ep-reisen.de - recipientName: 'E&P Reisen' - senderAddress: team@ep-reisen.de - senderName: '{text-1}' - replyToAddress: '{text-6}' - carbonCopyAddress: '' - blindCarbonCopyAddress: '' - format: html - attachUploads: false - translation: - language: '' - identifier: EmailToReceiver - - - options: - message: 'Vielen Dank für deine Bewerbung. Wir werden sie so schnell wie möglich bearbeiten.' - identifier: Confirmation -renderables: - - - renderingOptions: - previousButtonLabel: zurück - nextButtonLabel: weiter - type: Page - identifier: page-1 - label: '' - renderables: - - - defaultValue: '' - type: Text - identifier: text-1 - label: Name - properties: - fluidAdditionalAttributes: - placeholder: 'Vor- & Nachname' - required: required - elementDescription: '' - validators: - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: text-2 - label: Straße - properties: - fluidAdditionalAttributes: - placeholder: 'Straße & Hausnummer' - required: required - elementDescription: '' - validators: - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: text-3 - label: Wohnort - properties: - fluidAdditionalAttributes: - placeholder: 'PLZ & Ort' - required: required - validators: - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: text-4 - label: 'Mobil Nummer' - properties: - fluidAdditionalAttributes: - required: required - validators: - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: text-5 - label: 'Festnetz Nummer' - - - defaultValue: '' - type: Text - identifier: text-6 - label: 'E-Mail Adresse' - properties: - fluidAdditionalAttributes: - required: required - validators: - - - identifier: NotEmpty - - - identifier: EmailAddress - - - defaultValue: '' - type: Text - identifier: text-7 - label: Geburtsdatum - properties: - fluidAdditionalAttributes: - placeholder: tt.mm.jjjj - required: required - validators: - - - options: - regularExpression: '/\d{2}\.\d{2}\.\d{4}/' - identifier: RegularExpression - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: text-8 - label: Nationalität - - - properties: - options: - nein: nein - ja: ja - 'ja, mit Anhänger': 'ja, mit Anhänger' - type: RadioButton - identifier: radiobutton-1 - label: Führerschein - - - defaultValue: '' - type: Text - identifier: text-9 - label: Ausbildung/Studium - properties: - fluidAdditionalAttributes: - placeholder: 'Schul-, Uni-, Berufsausbildung' - elementDescription: '' - - - defaultValue: '' - type: Text - identifier: text-10 - label: 'Aktuelle Tätigkeit' - - - properties: - options: - Haus-/Destinationsleitung: Haus-/Destinationsleitung - Koch/Köchin: Koch/Köchin - Koch-Assistenz/Service: Koch-Assistenz/Service - 'Serviceleitung/Assistenz Hausleitung': 'Serviceleitung/Assistenz Hausleitung' - Serviceteamer: Serviceteamer - Reinigungskraft: Reinigungskraft - Materialteamer/Verleih: Materialteamer/Verleih - Allrounder: Allrounder - 'Praktikum im Schnee': 'Praktikum im Schnee' - elementDescription: '' - type: MultiCheckbox - identifier: multicheckbox-1 - label: 'Bewerbung als' - - - defaultValue: '' - type: Text - identifier: text-11 - label: 'Einsatz datum' - properties: - fluidAdditionalAttributes: - placeholder: 'von tt.mm.jjjj bis tt.mm.jjjj' - required: required - validators: - - - identifier: NotEmpty - - - properties: - options: - Ski: Ski - Snowboard: Snowboard - nichts: nichts - type: MultiCheckbox - identifier: multicheckbox-2 - label: 'Ich fahre' - validators: - - - identifier: NotEmpty - - - options: - minimum: '1' - maximum: '2' - identifier: Count - - - properties: - options: - 'noch nicht gelernt': 'noch nicht gelernt' - Anfänger: Anfänger - Fortgeschritten: Fortgeschritten - Experte: Experte - type: SingleSelect - identifier: singleselect-1 - label: 'Wie gut fahre ich Ski' - defaultValue: 'noch nicht gelernt' - - - defaultValue: '' - type: Text - identifier: text-12 - label: 'Skifahrer seit' - - - properties: - options: - 'noch nicht gelernt': 'noch nicht gelernt' - Anfänger: Anfänger - Fortgeschritten: Fortgeschritten - Experte: Experte - type: SingleSelect - identifier: singleselect-2 - label: 'Wie gut fahre ich Snowboard' - - - defaultValue: '' - type: Text - identifier: text-13 - label: 'Snowboarder seit' - properties: - elementDescription: '' - - - properties: - options: - nein: nein - 'Ski Grundstufe': 'Ski Grundstufe' - 'Board Grundstufe': 'Board Grundstufe' - 'Ski Instructor': 'Ski Instructor' - 'Board Instructor': 'Board Instructor' - 'Ski Begleitschein': 'Ski Begleitschein' - 'Board Begleitschein': 'Board Begleitschein' - type: MultiSelect - identifier: multiselect-1 - label: Ski-/Snowboardlehrerschein - defaultValue: - - nein - - - type: Fieldset - identifier: fieldset-1 - label: Fremdsprachen - renderables: - - - properties: - options: - nein: nein - Grundkenntnisse: Grundkenntnisse - gut: gut - 'sehr gut': 'sehr gut' - type: SingleSelect - identifier: singleselect-3 - label: Englisch - defaultValue: nein - - - properties: - options: - nein: nein - Grundkenntnisse: Grundkenntnisse - gut: gut - 'sehr gut': 'sehr gut' - type: SingleSelect - identifier: singleselect-4 - label: Französisch - defaultValue: nein - - - properties: - options: - nein: nein - Grundkenntnisse: Grundkenntnisse - gut: gut - 'sehr gut': 'sehr gut' - type: SingleSelect - identifier: singleselect-5 - label: Spanisch - defaultValue: nein - - - defaultValue: '' - type: Text - identifier: text-14 - label: 'Sonstige Fremdsprachen' - - - properties: - options: - ja: ja - nein: nein - type: RadioButton - identifier: radiobutton-2 - label: 'Kocherfahrung für Gruppen (min. 30 Personen)' - - - defaultValue: '' - type: Text - identifier: text-15 - label: 'Wenn ja, welche?' - properties: - elementDescription: '' - - - properties: - options: - ja: ja - nein: nein - type: RadioButton - identifier: radiobutton-3 - label: 'Erfahrungen im Tourismus' - - - defaultValue: '' - type: Text - identifier: text-16 - label: 'Wenn ja, welche?' - properties: - elementDescription: '' - - - properties: - options: - 'ja, mit Zertifikat zur Bindungseinstellung': 'ja, mit Zertifikat zur Bindungseinstellung' - nein: nein - type: RadioButton - identifier: radiobutton-4 - label: 'Erfahrungen im Skiverleih' - - - properties: - options: - Zillertal: Zillertal - Lenzerheide: Lenzerheide - 'Davos Klosters': 'Davos Klosters' - Montafon: Montafon - Saalbach: Saalbach - 'Les Deux Alpes': 'Les Deux Alpes' - '4 Vallées': '4 Vallées' - 'Val Thorens': 'Val Thorens' - 'Les Sybelles': 'Les Sybelles' - 'Portes du Soleil': 'Portes du Soleil' - type: MultiCheckbox - identifier: multicheckbox-3 - label: 'Ortskenntnisse in folgenden Destinationen' - - - properties: - options: - 'Damen 36': 'Damen 36' - 'Damen 38': 'Damen 38' - 'Damen 40': 'Damen 40' - 'Damen 42': 'Damen 42' - 'Herren S': 'Herren S' - 'Herren M': 'Herren M' - 'Herren L': 'Herren L' - 'Herren XL': 'Herren XL' - type: SingleSelect - identifier: singleselect-6 - label: Jackengröße - - - defaultValue: '' - type: Textarea - identifier: textarea-1 - label: 'Warum möchte ich für E&P Reisen arbeiten?' - - - properties: - options: - Freunde: Freunde - 'Social Media': 'Social Media' - Uni: Uni - Sonstiges: Sonstiges - type: MultiCheckbox - identifier: multicheckbox-4 - label: 'Wie bin ich auf E&P Reisen aufmerksam geworden?' - - - type: LinkedCheckbox - identifier: privacypolicyaccepted - label: 'Ich akzeptiere die %s.' - properties: - pageUid: '355' - linkText: 'Datenschutzbestimmungen' - fluidAdditionalAttributes: - required: required - validators: - - - identifier: NotEmpty diff --git a/packages/ep_theme/Resources/Private/Forms/ContactForm.form.yaml b/packages/ep_theme/Resources/Private/Forms/ContactForm.form.yaml deleted file mode 100644 index 3a0ec95..0000000 --- a/packages/ep_theme/Resources/Private/Forms/ContactForm.form.yaml +++ /dev/null @@ -1,148 +0,0 @@ - -renderingOptions: - submitButtonLabel: Absenden -type: Form -identifier: contactform -label: Kontaktformular -prototypeName: contactform -finishers: - - - identifier: BpnApiFinisher - options: - mapping: 'lastName:lastName,firstName:firstName,gender:gender,email:email,street:street,zipCode:zipCode,city:city,phone:phone' - - - options: - subject: 'Kontaktanfrage von {firstName} {lastName}' - recipientAddress: info@ep-reisen.de - recipientName: 'E&P Reisen' - senderAddress: info@ep-reisen.de - senderName: '{firstName} {lastName}' - replyToAddress: '{email}' - carbonCopyAddress: '' - blindCarbonCopyAddress: '' - format: html - attachUploads: false - translation: - language: '' - identifier: EmailToReceiver - - - options: - pageUid: '1387' - additionalParameters: '' - identifier: Redirect -renderables: - - - renderingOptions: - previousButtonLabel: 'Previous step' - nextButtonLabel: 'Neue Seite' - type: Page - identifier: page-1 - label: '' - renderables: - - - defaultValue: '' - type: Text - identifier: firstName - label: Vorname - properties: - fluidAdditionalAttributes: - placeholder: 'Vorname' - required: required - elementDescription: '' - validators: - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: lastName - label: 'Nachname' - properties: - fluidAdditionalAttributes: - placeholder: 'Nachname' - required: required - elementDescription: '' - validators: - - - identifier: NotEmpty - - - properties: - options: - M: M - W: W - D: D - fluidAdditionalAttributes: - required: required - type: SingleSelect - identifier: gender - label: 'Gender' - validators: - - - identifier: NotEmpty - - - defaultValue: '' - type: Text - identifier: email - label: 'E-Mail' - properties: - fluidAdditionalAttributes: - required: required - validators: - - - identifier: NotEmpty - - - identifier: EmailAddress - - - defaultValue: '' - type: Text - identifier: street - label: 'Straße' - properties: - fluidAdditionalAttributes: - placeholder: 'Straße & Nr.' - elementDescription: '' - - - defaultValue: '' - type: Text - identifier: zipCode - label: 'PLZ' - - - defaultValue: '' - type: Text - identifier: city - label: 'Ort' - - - defaultValue: '' - type: Text - identifier: phone - label: 'Telefon' - - - defaultValue: '' - type: Textarea - identifier: message - label: 'Deine Kontaktanfrage' - - - defaultValue: '' - type: Text - identifier: bookingNumber - label: 'Buchungsnummer (falls vorhanden)' - - - type: LinkedCheckbox - identifier: privacypolicyaccepted - label: 'Ich akzeptiere die %s.' - properties: - pageUid: '355' - linkText: 'Datenschutzbestimmungen' - fluidAdditionalAttributes: - required: required - validators: - - - identifier: NotEmpty - - - type: Captcha - identifier: captcha - label: Captcha - properties: - fluidAdditionalAttributes: - required: required - autocomplete: 'off' diff --git a/packages/ep_theme/Resources/Private/Language/locallang_mod.xlf b/packages/ep_theme/Resources/Private/Language/locallang_mod.xlf deleted file mode 100644 index ec927ef..0000000 --- a/packages/ep_theme/Resources/Private/Language/locallang_mod.xlf +++ /dev/null @@ -1,17 +0,0 @@ - - - -
- - - E&P SEO Übersicht - - - Page title und Meta Description Übersicht - - - Seiten - - - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Email/SystemEmail.html b/packages/ep_theme/Resources/Private/Layouts/Email/SystemEmail.html deleted file mode 100644 index bd3f29f..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Email/SystemEmail.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - - - - - - - -
-
- - - - - - - - - - -
- - -
-
- - - - - - - - - - - -
- -
- -
- - -
-
- - -
- - -
-
- - - - - - - - -
- - - -
- - -
-
- - -
-
-
- - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Form/Default.html b/packages/ep_theme/Resources/Private/Layouts/Form/Default.html deleted file mode 100644 index 8027861..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Form/Default.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/ep_theme/Resources/Private/Layouts/Gridelements/Default.html b/packages/ep_theme/Resources/Private/Layouts/Gridelements/Default.html deleted file mode 100644 index 5852942..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Gridelements/Default.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/packages/ep_theme/Resources/Private/Layouts/News/Detail.html b/packages/ep_theme/Resources/Private/Layouts/News/Detail.html deleted file mode 100644 index dbdac17..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/News/Detail.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/Backend.html b/packages/ep_theme/Resources/Private/Layouts/Page/Backend.html deleted file mode 100644 index a606ca0..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/Backend.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/Frontpage.html b/packages/ep_theme/Resources/Private/Layouts/Page/Frontpage.html deleted file mode 100644 index 093cef2..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/Frontpage.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - -
- -
-
- - - - - - -
-
- -
- - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/FrontpageEvent.html b/packages/ep_theme/Resources/Private/Layouts/Page/FrontpageEvent.html deleted file mode 100644 index b95d455..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/FrontpageEvent.html +++ /dev/null @@ -1,22 +0,0 @@ - - - -
- - -
-
- -
-
- -
- - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/Popup.html b/packages/ep_theme/Resources/Private/Layouts/Page/Popup.html deleted file mode 100644 index c0d8ba9..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/Popup.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/Search.html b/packages/ep_theme/Resources/Private/Layouts/Page/Search.html deleted file mode 100644 index 2a564bd..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/Search.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - -
- -
-
- -
- - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeft.html b/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeft.html deleted file mode 100644 index 8e2ca53..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeft.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -
- - - - - - -
-
- - -
-
- -
-
- -
-
- -
-
- -
- - - - - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeftEvent.html b/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeftEvent.html deleted file mode 100644 index 1574c07..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeftEvent.html +++ /dev/null @@ -1,29 +0,0 @@ - - - -
- -
-
- - -
-
- -
-
- -
-
- -
-
- -
- - - - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarRightEvent.html b/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarRightEvent.html deleted file mode 100644 index f3492f2..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarRightEvent.html +++ /dev/null @@ -1,29 +0,0 @@ - - - -
- - -
-
- -
-
- -
-
- -
-
- -
-
- -
- - - - - diff --git a/packages/ep_theme/Resources/Private/Layouts/Page/Travelinfo.html b/packages/ep_theme/Resources/Private/Layouts/Page/Travelinfo.html deleted file mode 100644 index b89f0a4..0000000 --- a/packages/ep_theme/Resources/Private/Layouts/Page/Travelinfo.html +++ /dev/null @@ -1,28 +0,0 @@ - - -
- - - - -
Login
-
My E&P
-
-
-
- -
-
- -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/City/Teaser.html b/packages/ep_theme/Resources/Private/Partials/City/Teaser.html deleted file mode 100644 index 731961b..0000000 --- a/packages/ep_theme/Resources/Private/Partials/City/Teaser.html +++ /dev/null @@ -1,52 +0,0 @@ - - - -
-
- {ep:icon(icon: 'flag-{city.country.code -> f:format.case(mode: \'lower\')}', class: 'w-8 h-6 absolute top-0 left-0')} - - - - - - - - - - - - - - - - - - -
-
- - {city.name} - - -
- {city.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()} -
-
- {f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')} -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Concept/Teaser.html b/packages/ep_theme/Resources/Private/Partials/Concept/Teaser.html deleted file mode 100644 index 5396ecd..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Concept/Teaser.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - -
-
- - - - - - - - - - - - - - - - - - -
- - {concept.name} - - -
-
-
- {concept.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()} -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/ContactForm/Error.html b/packages/ep_theme/Resources/Private/Partials/ContactForm/Error.html deleted file mode 100644 index be31d82..0000000 --- a/packages/ep_theme/Resources/Private/Partials/ContactForm/Error.html +++ /dev/null @@ -1,18 +0,0 @@ - - -
-

- Es ist ein Problem aufgetreten. Bitte versucht es noch einmal. -

-

- -

-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/ContactForm/Success.html b/packages/ep_theme/Resources/Private/Partials/ContactForm/Success.html deleted file mode 100644 index 570d878..0000000 --- a/packages/ep_theme/Resources/Private/Partials/ContactForm/Success.html +++ /dev/null @@ -1,19 +0,0 @@ - - -
-

- Vielen Dank für Eure Anfrage. Wir werden uns schnellstmöglich mit Euch in Verbindung - setzen. -

-

- -

-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disrupter/Large.html b/packages/ep_theme/Resources/Private/Partials/Disrupter/Large.html deleted file mode 100644 index 38230a7..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disrupter/Large.html +++ /dev/null @@ -1,63 +0,0 @@ - - -
- - - -
- -
- {data.subheadline} - {data.headline} -
- {data.bodytext -> f:format.html()} -
- -
- - - {button.container.label} - - -
-
-
-
- - - -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disrupter/LastChance.html b/packages/ep_theme/Resources/Private/Partials/Disrupter/LastChance.html deleted file mode 100644 index a76eb08..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disrupter/LastChance.html +++ /dev/null @@ -1,29 +0,0 @@ - - -
- -
-
- {data.headline} -
-
- {data.text -> f:format.html()} -
-
- {data.flexForm.buttons -> v:iterator.first() -> v:variable.set(name: 'button')} - - {button.container.label -> f:format.raw()} - -
-
- -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disrupter/Reminder.html b/packages/ep_theme/Resources/Private/Partials/Disrupter/Reminder.html deleted file mode 100644 index 5974779..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disrupter/Reminder.html +++ /dev/null @@ -1,30 +0,0 @@ - - - -
-
- {data.headline} -
- -
- {data.text -> f:format.html()} -
- - {button.container.label -> f:format.raw()} - -
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disrupter/Small.html b/packages/ep_theme/Resources/Private/Partials/Disrupter/Small.html deleted file mode 100644 index 36925d7..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disrupter/Small.html +++ /dev/null @@ -1,42 +0,0 @@ - - -
- -
-
-
- - - -
-
- {data.headline} - {data.text -> f:format.html()} -
- - - - {button.container.label} - - - -
-
-
-
- -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disturber/Large.html b/packages/ep_theme/Resources/Private/Partials/Disturber/Large.html deleted file mode 100644 index fa2f2ca..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disturber/Large.html +++ /dev/null @@ -1,64 +0,0 @@ - - -
- - - -
- -
- {data.subheader} - {data.header} -
- {data.bodytext -> f:format.html()} -
- -
- - - {button.container.label} - - -
-
-
-
- - - -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disturber/LastChance.html b/packages/ep_theme/Resources/Private/Partials/Disturber/LastChance.html deleted file mode 100644 index c19c492..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disturber/LastChance.html +++ /dev/null @@ -1,21 +0,0 @@ - - -
-
- {data.header} -
-
- {data.bodytext -> f:format.html()} -
-
- {data.flexForm.buttons -> v:iterator.first() -> v:variable.set(name: 'button')} - - {button.container.label -> f:format.raw()} - -
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disturber/Reminder.html b/packages/ep_theme/Resources/Private/Partials/Disturber/Reminder.html deleted file mode 100644 index e542856..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disturber/Reminder.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -
-
- {data.header} -
- -
-
- {data.bodytext -> f:format.html()} -
-
- - {button.container.label -> f:format.raw()} - -
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Disturber/Small.html b/packages/ep_theme/Resources/Private/Partials/Disturber/Small.html deleted file mode 100644 index 4c3a560..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Disturber/Small.html +++ /dev/null @@ -1,42 +0,0 @@ - - -
- -
-
-
- - - -
-
- {data.header} - {data.bodytext -> f:format.html()} -
- - - - {button.container.label} - - - -
-
-
-
- -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/EventDisturber.html b/packages/ep_theme/Resources/Private/Partials/EventDisturber.html deleted file mode 100644 index 021da35..0000000 --- a/packages/ep_theme/Resources/Private/Partials/EventDisturber.html +++ /dev/null @@ -1,34 +0,0 @@ - - -
-
-
-
-
- {headline -> f:format.raw()} -
-
-
    - -
  • - {ep:icon(icon: 'check', class: 'w-6 h-6')} - {listItem -> f:format.raw()} -
  • -
    -
-
- -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/EventHero.html b/packages/ep_theme/Resources/Private/Partials/EventHero.html deleted file mode 100644 index c5cc2ee..0000000 --- a/packages/ep_theme/Resources/Private/Partials/EventHero.html +++ /dev/null @@ -1,75 +0,0 @@ - - -
-
-
-
- -
- {settings.eventHeroClaim -> f:format.raw()} -
-
- {settings.eventHeroDescription -> f:format.raw()} -
-
-
-
- {settings.eventDateDayFrom -> f:format.raw()} - {settings.eventDateDayTo -> f:format.raw()} {settings.eventDateMonth -> f:format.raw()} - -
-
- - - - - - - - - - - - - -
- - - - -
- {badgeData.title -> f:format.raw()} - {badgeData.subtitle -> f:format.raw()} -
-
-
-
-
- -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/FaqGroup.html b/packages/ep_theme/Resources/Private/Partials/FaqGroup.html deleted file mode 100644 index ca91b20..0000000 --- a/packages/ep_theme/Resources/Private/Partials/FaqGroup.html +++ /dev/null @@ -1,40 +0,0 @@ - - - -
- -
-
- -
- {category} -
-
- -
- - -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Captcha.html b/packages/ep_theme/Resources/Private/Partials/Form/Captcha.html deleted file mode 100644 index e977f46..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Captcha.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - -
- - - The "now" param keeps bw_captcha 3.x from sending a Content-Length that is the base64 size of the - binary image (too large), which makes Chrome drop the response. Fixed upstream in bw_captcha 4.0.1. - - Captcha image - - - -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Checkbox.html b/packages/ep_theme/Resources/Private/Partials/Form/Checkbox.html deleted file mode 100644 index 2fc546d..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Checkbox.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/ContentElement.html b/packages/ep_theme/Resources/Private/Partials/Form/ContentElement.html deleted file mode 100644 index f38f99a..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/ContentElement.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - {element.properties.contentElementUid} - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Date.html b/packages/ep_theme/Resources/Private/Partials/Form/Date.html deleted file mode 100644 index 834ca46..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Date.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Email.html b/packages/ep_theme/Resources/Private/Partials/Form/Email.html deleted file mode 100644 index 590dbdb..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Email.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Field/Field.html b/packages/ep_theme/Resources/Private/Partials/Form/Field/Field.html deleted file mode 100644 index 60fb3b4..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Field/Field.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Fieldset.html b/packages/ep_theme/Resources/Private/Partials/Form/Fieldset.html deleted file mode 100644 index 7e99729..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Fieldset.html +++ /dev/null @@ -1,12 +0,0 @@ - - -
- - {formvh:translateElementProperty(element: element, property: 'label')} - - - - -
-
- diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Form/Navigation.html b/packages/ep_theme/Resources/Private/Partials/Form/Form/Navigation.html deleted file mode 100644 index 4b8ec61..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Form/Navigation.html +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/LinkedCheckbox.html b/packages/ep_theme/Resources/Private/Partials/Form/LinkedCheckbox.html deleted file mode 100644 index 3d52470..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/LinkedCheckbox.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/MultiCheckbox.html b/packages/ep_theme/Resources/Private/Partials/Form/MultiCheckbox.html deleted file mode 100644 index fde92f4..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/MultiCheckbox.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - {formvh:translateElementProperty(element: element, property: 'label')} - - - - - - - - - - - -
- -
-
-
-
- diff --git a/packages/ep_theme/Resources/Private/Partials/Form/MultiSelect.html b/packages/ep_theme/Resources/Private/Partials/Form/MultiSelect.html deleted file mode 100644 index 4d1440d..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/MultiSelect.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Number.html b/packages/ep_theme/Resources/Private/Partials/Form/Number.html deleted file mode 100644 index f323739..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Number.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/RadioButton.html b/packages/ep_theme/Resources/Private/Partials/Form/RadioButton.html deleted file mode 100644 index 9e2064a..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/RadioButton.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - {formvh:translateElementProperty(element: element, property: 'label')} - -
- -
-
-
-
- diff --git a/packages/ep_theme/Resources/Private/Partials/Form/SingleSelect.html b/packages/ep_theme/Resources/Private/Partials/Form/SingleSelect.html deleted file mode 100644 index 4e1da4a..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/SingleSelect.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/StaticText.html b/packages/ep_theme/Resources/Private/Partials/Form/StaticText.html deleted file mode 100644 index 74f182d..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/StaticText.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - {formvh:translateElementProperty(element: element, property: 'text') -> f:format.nl2br()} - -

-
-
- diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Telephone.html b/packages/ep_theme/Resources/Private/Partials/Form/Telephone.html deleted file mode 100644 index aed976c..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Telephone.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Text.html b/packages/ep_theme/Resources/Private/Partials/Form/Text.html deleted file mode 100644 index 9d78acd..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Text.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Form/Textarea.html b/packages/ep_theme/Resources/Private/Partials/Form/Textarea.html deleted file mode 100644 index b6e522d..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Form/Textarea.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Header/Standalone.html b/packages/ep_theme/Resources/Private/Partials/Header/Standalone.html deleted file mode 100644 index be5a449..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Header/Standalone.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/HeaderSlider.html b/packages/ep_theme/Resources/Private/Partials/HeaderSlider.html deleted file mode 100644 index 5097109..0000000 --- a/packages/ep_theme/Resources/Private/Partials/HeaderSlider.html +++ /dev/null @@ -1,87 +0,0 @@ - - -
-
-
    - -
  • -
    - - -
    - - - - {image.alternative} - -
    -
    -
    -
    -
    -
    - - {slide.headline} - - - - - - - {slide.button} - - -
    -
    -
    - -
    - - -
    -
    Ski-
    Pass
    -
    inklusive
    -
    -
    -
    - - - -
    - - - - -
    - {badgeData.title -> f:format.raw()} - - {badgeData.subtitle -> f:format.raw()} - -
    -
    -
    -
    -
    -
    -
    -
    -
  • -
    -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/News/Detail/MediaContainer.html b/packages/ep_theme/Resources/Private/Partials/News/Detail/MediaContainer.html deleted file mode 100644 index 100fb74..0000000 --- a/packages/ep_theme/Resources/Private/Partials/News/Detail/MediaContainer.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - {images.0.alternative} - - - -
- - - - -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/News/List/Item.html b/packages/ep_theme/Resources/Private/Partials/News/List/Item.html deleted file mode 100644 index 85a3764..0000000 --- a/packages/ep_theme/Resources/Private/Partials/News/List/Item.html +++ /dev/null @@ -1,70 +0,0 @@ - - -
- -
-
- - - - - {mediaElement.originalResource.alternative} - - - - - - - {mediaElement.originalResource.alternative} - - - - -
-
- -

- {newsItem.title} -

- -
-

- {newsItem.author} am - - in - - - {tag.title} - - {f:if(condition: iteration.isLast, else: ', ')} - - -

- -
- - - {newsItem.teaser -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.html()} - - - {newsItem.bodytext -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.html()} - - -
-
-
- -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/NotBookable.html b/packages/ep_theme/Resources/Private/Partials/NotBookable.html deleted file mode 100644 index 482398c..0000000 --- a/packages/ep_theme/Resources/Private/Partials/NotBookable.html +++ /dev/null @@ -1,11 +0,0 @@ -{namespace v=FluidTYPO3\Vhs\ViewHelpers} -
-

Die von Dir gewählte Unterkunft ist aktuell nicht buchbar.

-
    -
  • Wir informieren dich, wenn deine Reise buchbar ist - Trage dich in unsere - Reisealert-Liste ein!
  • -
  • Du kannst diese aber ggf. auch vorreservieren, oder wir helfen dir, eine andere Unterkunft - zu finden. Ruf uns an unter {settings.phoneNumber} - oder schreibe an .
  • -
-
diff --git a/packages/ep_theme/Resources/Private/Partials/Region/Teaser.html b/packages/ep_theme/Resources/Private/Partials/Region/Teaser.html deleted file mode 100644 index eb3484c..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Region/Teaser.html +++ /dev/null @@ -1,52 +0,0 @@ - - - -
-
- {ep:icon(icon: 'flag-{region.country.code -> f:format.case(mode: \'lower\')}', class: 'w-8 h-6 absolute top-0 left-0')} - - - - - - - - - - - - - - - - - - -
-
- - {region.name} - - -
- {region.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()} -
-
- {f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')} -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Search/FilterPanel.html b/packages/ep_theme/Resources/Private/Partials/Search/FilterPanel.html deleted file mode 100644 index 99e1d3a..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Search/FilterPanel.html +++ /dev/null @@ -1,348 +0,0 @@ - - -
- -
- - -
-
-
-
- - {ep:icon(icon: 'calendar', class: 'w-6 h-6 text-white absolute top-0 right-0 translate-y-1/2 mr-2')} -
- -
- - - -
-
- -
-
-
-
-
- -
- -
-
    - -
  • - -
  • -
    -
-
-
- - - - - -
- -
- -
-
    - -
  • - - -
      - -
    • - -
    • -
      -
    -
    -
  • -
    -
-
-
- -
- -
-
    - -
  • - -
  • -
    -
-
-
- -
- -
- -
-
- - -
- -
-
    - - -
  • - -
  • -
    -
    -
-
-
- -
- -
-
    - - -
  • - -
  • -
    -
    -
-
-
- - -
- -
-
    - - -
  • - -
  • -
    -
    -
-
-
- - -
- -
-
    -
  • - -
  • -
-
-
-
- -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Search/Main.html b/packages/ep_theme/Resources/Private/Partials/Search/Main.html deleted file mode 100644 index 01ce3c3..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Search/Main.html +++ /dev/null @@ -1,35 +0,0 @@ - - -
-
- -
-
-

- Suchergebnis -

- -
- -
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Search/Result.html b/packages/ep_theme/Resources/Private/Partials/Search/Result.html deleted file mode 100644 index 348b16a..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Search/Result.html +++ /dev/null @@ -1,114 +0,0 @@ - - -
-
- - - {ep:icon(icon: 'emoji-happy', class: 'w-6 h-6 text-white')} - - - {ep:icon(icon: 'emoji-sad', class: 'w-6 h-6 text-white')} - - -
-
- Deine Suche - - - - nach {meta.destinationName} - - - {meta.dateRange} - - ergab {meta.total} Treffer - - - ergab leider keine genauen Treffer. Bitte benutze die Filter. - - -
-
- - -
-

- {section.concept.name} -

-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/SubpageHeader.html b/packages/ep_theme/Resources/Private/Partials/SubpageHeader.html deleted file mode 100644 index d90d4c4..0000000 --- a/packages/ep_theme/Resources/Private/Partials/SubpageHeader.html +++ /dev/null @@ -1,68 +0,0 @@ - - -
- - - - - - - - - -
-
-
- - {topline} - - - {headline} - -
-
-
- -
{headerImage.description -> f:format.htmlspecialchars()}
-
- -
- - -
-

Ski-
Pass

-

inklusive

-
-
-
- - - -
- - - - -
- {badgeData.title -> f:format.raw()} - - {badgeData.subtitle -> f:format.raw()} - -
-
-
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Teaser/OneColumn.html b/packages/ep_theme/Resources/Private/Partials/Teaser/OneColumn.html deleted file mode 100644 index d2e520b..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Teaser/OneColumn.html +++ /dev/null @@ -1,34 +0,0 @@ - - - -
-
- - {ep:icon(icon: 'flag-{context.country.code -> f:format.case(mode: \'lower\')}', class: 'w-8 h-6 absolute top-0 left-0')} - - -
-
- - {data.header -> f:format.nl2br()}{f:if(condition: data.subheader, then: '
{data.subheader}')} - -
-
- {data.bodytext -> f:format.html()} -
-
- {data.button -> v:or(alternative: 'Details')} -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/Teaser/TwoColumn.html b/packages/ep_theme/Resources/Private/Partials/Teaser/TwoColumn.html deleted file mode 100644 index 0bf16d1..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Teaser/TwoColumn.html +++ /dev/null @@ -1,27 +0,0 @@ - - - -
-
- -
- -
- {data.button -> v:or(alternative: 'Details')} -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Partials/TeaserImage.html b/packages/ep_theme/Resources/Private/Partials/TeaserImage.html deleted file mode 100644 index ed21a4d..0000000 --- a/packages/ep_theme/Resources/Private/Partials/TeaserImage.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/TeaserWideImage.html b/packages/ep_theme/Resources/Private/Partials/TeaserWideImage.html deleted file mode 100644 index 9054c5f..0000000 --- a/packages/ep_theme/Resources/Private/Partials/TeaserWideImage.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - {image.alternative} - - - - - - diff --git a/packages/ep_theme/Resources/Private/Partials/Travelinfo.html b/packages/ep_theme/Resources/Private/Partials/Travelinfo.html deleted file mode 100644 index 39924d3..0000000 --- a/packages/ep_theme/Resources/Private/Partials/Travelinfo.html +++ /dev/null @@ -1,532 +0,0 @@ - - - -
-
- -
-
-
- Reiseinformation -
- -
-
-
-
-

- {travelInfo.subline} - {travelInfo.headline} -

- {travelInfo.introText -> f:format.html()} - -

- {travelData.label} {travelData.dateFrom -> f:format.date(format: 'd.m.Y')} - {travelData.dateTo -> f:format.date(format: 'd.m.Y')} -

-
-
-
-
-
-
-
- -
-
- Anreise -
-
-
- - - -

- Adresse -

-

- {travelData.hotel.name} -
- {travelData.hotel.street} -
- {travelData.hotel.country} {travelData.hotel.city} -

-
-
- - - - - - - -
-
- -
- -
-
-
-
-
-
- - - - - - - -
-
- -
- -
-
-
-
-
-
-
-
-
- -

- Eigenanreise -

- {travelInfo.selfArrangedText -> f:format.html()} -
-
-
-
-
-

- Sei vorbereitet! - Organisatorisches -

-
-
- - - -
-
-
- -
-
-
- -
-
- Weitere Infos -
-
-
- {travelInfo.additionalInfo -> f:format.html()} -
-
-
- -
-
-
- Wichtige Telefon­nummern -
-
-
- -

- Busbegleitung / Reiseleitung -
- {travelData.guide.name} {travelData.guide.phone} -

-
- {travelInfo.importantPhoneNumbers -> f:format.html()} -
-
-
- -
-
-
- Wichtige Links vor Ort -
-
-
- {travelInfo.importantLinks -> f:format.html()} -
-
-
-
-
-
- {travelInfo.footerText -> f:format.html()} - -
-
- -
-
- - -
-
- - - - - -
-
-
-
-
- -
-
-
-
-
-

- {teaser.title} -

- - - - -
    - -
  • - {item.label} -
  • -
    -
-
-
-
- - - -

- Folgende Kurse finden statt -

-
    - -
  • - {course.label} -
  • -
    -
-
- -

- Bei Eurer Reise finden keine Kurse statt. -

-
-
-
-
- {teaser.bodytext -> f:format.html()} -
-
- -
-
-
-
-
- - - -
- -
-
- {item.title -> f:format.raw()} -
-
-
- - -

- Bus-Zustiege -

-

- Bitte findet euch mindestens 20 Minuten vor Abfahrt an der gebuchten Haltestelle ein. -

- {travelInfo.busInfoText -> f:format.html()} - - - - - - - - - - - -
- Zustieg - - Datum/Uhrzeit -
- {pickup.city}
{pickup.location} -
- {pickup.datetime -> f:format.date(format: 'd.m.Y')}
{pickup.datetime -> f:format.date(format: 'H:i')} Uhr -
- -

- Die Rückreise mit dem Bus startet {departureDayTime}. -

-
- {travelInfo.departureText -> f:format.html()} -
- - -

- Bus-Zustiege -

-

- Bitte findet euch mindestens 20 Minuten vor Abfahrt an der gebuchten Haltestelle ein. -

- {travelInfo.busInfoText -> f:format.html()} - - - - - - - - - - - -
- Zustieg - - Datum/Uhrzeit -
- {pickup.city}
{pickup.street} -
- {pickup.time -> f:format.date(format: 'd.m.Y')}
{pickup.time -> f:format.date(format: 'H:i')} Uhr -
- -

- Die Rückreise mit dem Bus startet {departureDayTime}. -

-
- {travelInfo.departureText -> f:format.html()} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceCalendar.html b/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceCalendar.html deleted file mode 100644 index a2b1062..0000000 --- a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceCalendar.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - -
- Der Kalender konnte aktuell nicht geladen werden. -
- -
- -
- - -
-
- -
-
- {month.date} -
- - - - - - - - - - - - - - - - - - - - - -
MoDiMiDoFrSaSo
- - - - - - - -
 
-
-
-
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceConfig.html b/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceConfig.html deleted file mode 100644 index 5bd064e..0000000 --- a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceConfig.html +++ /dev/null @@ -1 +0,0 @@ -{priceConfig -> f:format.json() ->f:format.raw()} diff --git a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceTable.html b/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceTable.html deleted file mode 100644 index 179997d..0000000 --- a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/PriceTable.html +++ /dev/null @@ -1,79 +0,0 @@ - - - -
-

- Preise {year} -

- - - - - - - - - - - - - - - - - - - - - - - -
- von - - bis - - Saison - - Pax bis - - Mindestmiete pro Nacht - - weitere Personen pro Nacht -
- {row.dateFrom -> f:format.date(format: 'd.m.Y')} - - {row.dateTo -> f:format.date(format: 'd.m.Y')} - - - VNS - NS - HS - {row.season} - - - {row.includedPax} - - - - - {row.defaultPricePerNight -> f:format.currency(currencySign: row.currency)} - - {row.pricePerNight -> f:format.currency(currencySign: row.currency)} - - - {row.pricePerNight -> f:format.currency(currencySign: row.currency)} - - - - {row.priceAdditionalPerson -> f:format.currency(currencySign: row.currency)} -
-
- VNS = Vorteils-Nebensaison, NS = Nebensaison, HS = Hauptsaison -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/Range.html b/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/Range.html deleted file mode 100644 index f91c095..0000000 --- a/packages/ep_theme/Resources/Private/Templates/AjaxCalendar/Range.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - -
- -
- Der Kalender konnte aktuell nicht geladen werden. -
-
- - - -
-
- - -
- - - - - - - - - - - - - - - - - -
- {weekday} -
- - - - - -   - - -
-
- {month.date} -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/AjaxFilterPanel/Index.html b/packages/ep_theme/Resources/Private/Templates/AjaxFilterPanel/Index.html deleted file mode 100644 index 9aad6b6..0000000 --- a/packages/ep_theme/Resources/Private/Templates/AjaxFilterPanel/Index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - -
- -
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/AjaxSearch/Searchresult.html b/packages/ep_theme/Resources/Private/Templates/AjaxSearch/Searchresult.html deleted file mode 100644 index 6c17236..0000000 --- a/packages/ep_theme/Resources/Private/Templates/AjaxSearch/Searchresult.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/AjaxWatchlist/List.html b/packages/ep_theme/Resources/Private/Templates/AjaxWatchlist/List.html deleted file mode 100644 index 459287a..0000000 --- a/packages/ep_theme/Resources/Private/Templates/AjaxWatchlist/List.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - -
- Deine Merkliste ist aktuell leer... -
-
- - -
-

- {section.concept.name} -

-
- - - -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Backend/ListPages.html b/packages/ep_theme/Resources/Private/Templates/Backend/ListPages.html deleted file mode 100644 index 30936a0..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Backend/ListPages.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -

SEO Übersicht

- - - - - - - - - - - - - - - - - - - - -
SeiteSEO TitleMeta Description
- - {page.title} - - - - - - {page.seoTitle} - - {page.description} - -
- - - -
-
-
- -
- - diff --git a/packages/ep_theme/Resources/Private/Templates/City/Detail.html b/packages/ep_theme/Resources/Private/Templates/City/Detail.html deleted file mode 100644 index 5456d92..0000000 --- a/packages/ep_theme/Resources/Private/Templates/City/Detail.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - -
- -
-
- -
-
- - - - - -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/City/Teasergroup.html b/packages/ep_theme/Resources/Private/Templates/City/Teasergroup.html deleted file mode 100644 index 4b75bdb..0000000 --- a/packages/ep_theme/Resources/Private/Templates/City/Teasergroup.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - -
- -
- - -
-
- - - -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Concept/Detail.html b/packages/ep_theme/Resources/Private/Templates/Concept/Detail.html deleted file mode 100644 index 5545164..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Concept/Detail.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - -
- -
-
-
- {concept.description -> f:format.html()} -
- - - -
-
- - -
-
- - - -
- - -
- - Alle anzeigen - -
-
-
-
-
- - - - - -
- -
- {concept.descriptionExtended -> f:format.html()} -
-
- - - - - -
-
-
    - - - -
  • - - {page.title} - -
  • -
    -
    -
    -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Concept/Teasergroup.html b/packages/ep_theme/Resources/Private/Templates/Concept/Teasergroup.html deleted file mode 100644 index 78e557b..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Concept/Teasergroup.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - -
-
- - -
-
- - - -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Country/Detail.html b/packages/ep_theme/Resources/Private/Templates/Country/Detail.html deleted file mode 100644 index fddc6b4..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Country/Detail.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - -
- -
-
-
- {country.description -> f:format.html()} -
- -
- - -
- - - -
-
- -
- - -
-
- - - -
-
-
- - -
- - Alle anzeigen - -
-
-
-
-
- -
- {country.descriptionExtended -> f:format.html()} -
-
- - - -
-
- - - -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Email/Autoreply.html b/packages/ep_theme/Resources/Private/Templates/Email/Autoreply.html deleted file mode 100644 index 0db083c..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Email/Autoreply.html +++ /dev/null @@ -1,15 +0,0 @@ -
- - - - -

Sehr geehrte Damen und Herren,

-

auf Grund einer internen Schulung ist unser Büro bis Dienstag, 24.04.2018 nicht besetzt.

-

In dringenden Fällen schreiben Sie eine Mail an nils.klems@ep-reisen.de, die E-Mails werden nur in - unregelmäßigen Abständen gelesen.

-

Vielen Dank.

-
- -
diff --git a/packages/ep_theme/Resources/Private/Templates/Email/ContactForm.html b/packages/ep_theme/Resources/Private/Templates/Email/ContactForm.html deleted file mode 100644 index 74c4cd0..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Email/ContactForm.html +++ /dev/null @@ -1,65 +0,0 @@ -
- - - - -

Anfrage E&P Reisen vom

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Seite{contactForm.pageUrl}
Name{contactForm.name}
Vorname{contactForm.firstName}
Geschlecht{contactForm.gender}
Firma/Verein{contactForm.company -> v:or(alternative: 'Keine Angabe')}
E-Mail{contactForm.email}
Telefon{contactForm.phone}
Zeitraum{contactForm.period -> v:or(alternative: 'Keine Angabe')}
Aufenthaltsdauer{contactForm.duration -> v:or(alternative: 'Keine Angabe')}
Anzahl der Personen{contactForm.pax -> v:or(alternative: 'Keine Angabe')}
Durchschnittsalter{contactForm.age -> v:or(alternative: 'Keine Angabe')}
Kinder{contactForm.children -> v:or(alternative: 'Nein')}
Anfrage/Wunsch{contactForm.inquiry -> v:or(alternative: 'Keine Angabe')}
-
- -
diff --git a/packages/ep_theme/Resources/Private/Templates/Email/GroupsPrice.html b/packages/ep_theme/Resources/Private/Templates/Email/GroupsPrice.html deleted file mode 100644 index 54aa868..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Email/GroupsPrice.html +++ /dev/null @@ -1,157 +0,0 @@ -
- - - - - - -

Buchung Gruppenhaus vom

-
- -

Anfrage Gruppenhaus vom

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Art - - {f:if(condition: '{mode} == "booking"', then: 'Buchung', else: 'Anfrage')} -
Haus{hotel.name}
Name{name}
Name der Gruppe{group}
Straße{street}
Postleitzahl{postcode}
Ort{city}
E-Mail{email}
Telefon{phone -> v:or(alternative: '-')}
Zeitraum{dateFrom} - {dateTo}
Nächte{nights}
Anzahl der Personen{pax -> v:or(alternative: '-')}
Anzahl Kinder 0-3 Jahre{children -> v:or(alternative: '-')}
Anzahl Kinder 4-5 Jahre{minors -> v:or(alternative: '-')}
Anzahl Kinder 6-{adolescentsAge} Jahre{adolescents -> v:or(alternative: '-')}
Verpflegung - - - {board.title} - - - - - - -
Optionale Zusatzleistungen - - -
    - -
  • {option}
  • -
    -
-
- - - - -
-
Kostenübersicht -
    -
  • - Grundpreis: {summary.paxBase} -
  • -
  • - Aufpreis Personen: {summary.paxAdditional -> v:or(alternative: '-')} -
  • -
  • - Verpflegung: {summary.board -> v:or(alternative: '-')} -
  • -
  • - Kleingruppen-Verpflegungszuschlag: {summary.undersubscription -> v:or(alternative: '-')} -
  • -
  • - Aufpreis Kurzzeit: {summary.shortTerm -> v:or(alternative: '-')} -
  • -
  • - Strom- und Abfallgebühren: {summary.runningCosts -> v:or(alternative: '-')} -
  • -
  • - Gesamtpreis: {summary.total} -
  • -
-
Bemerkungen/Wünsche - - - {remarks -> f:format.nl2br()} - - - - - - -
-
- -
diff --git a/packages/ep_theme/Resources/Private/Templates/Faq/Detail.html b/packages/ep_theme/Resources/Private/Templates/Faq/Detail.html deleted file mode 100644 index a027350..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Faq/Detail.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Calendar.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Calendar.html deleted file mode 100644 index 2bc5286..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Calendar.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - -
-

Belegungskalender {hotel.0.data.name}

-
- -
-
- - - -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Contact.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Contact.html deleted file mode 100644 index 3c44074..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Contact.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - -
-
-
- - - -
-
- {contact.0.data.name} -
{contact.0.data.tasks -> f:format.nl2br()}
-
{contact.0.data.phone}
-
E-Mail
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/DealOfTheWeek.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/DealOfTheWeek.html deleted file mode 100644 index 58dd7b2..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/DealOfTheWeek.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - -
-
- -
-
- - SchneEPchen - -
-
-
-
- Angebot -
- - {data.header} - -
- {data.bodytext -> f:format.nl2br()} -
- - - Details - - -
-
-
- -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Disrupter.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Disrupter.html deleted file mode 100644 index 5fe1e8b..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Disrupter.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Disturber.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Disturber.html deleted file mode 100644 index 9b5c115..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Disturber.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/EventPricetable.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/EventPricetable.html deleted file mode 100644 index b811601..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/EventPricetable.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/FaqOverview.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/FaqOverview.html deleted file mode 100644 index 85be72c..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/FaqOverview.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -
-
-
- - {ep:icon(icon: 'search', class: 'w-6 h-6 absolute top-2 right-2')} -
- - - - - -
- {ep:icon(icon: 'info-circle', class: 'w-4 h-4')} - - Weitere Reiseinfos findet ihr hier - -
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Gmap.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Gmap.html deleted file mode 100644 index a8df501..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Gmap.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Lineup.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Lineup.html deleted file mode 100644 index 7ec6f5f..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Lineup.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -
- -
-
- -
-
-
- - {item.data.name -> f:format.raw()} - -
- {item.data.description -> f:format.html()} -
- -
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/MenuSection.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/MenuSection.html deleted file mode 100644 index a032b66..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/MenuSection.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - -
- - - - - - - - - -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/MenuSectionPages.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/MenuSectionPages.html deleted file mode 100644 index ca80706..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/MenuSectionPages.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/NewsletterForm.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/NewsletterForm.html deleted file mode 100644 index 91fec97..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/NewsletterForm.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Teaser.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Teaser.html deleted file mode 100644 index b46ccc4..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Teaser.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCity.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCity.html deleted file mode 100644 index f1caa5a..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCity.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserConcept.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserConcept.html deleted file mode 100644 index bb8e336..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserConcept.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCountry.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCountry.html deleted file mode 100644 index aebcaea..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserCountry.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - -
-
- - - - - - -
-
- - {country.name} - - -
- {country.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()} -
-
- {data.button -> v:or(alternative: 'Details')} -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserRegion.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserRegion.html deleted file mode 100644 index 99a2846..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserRegion.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Textpic.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Textpic.html deleted file mode 100644 index 62c4211..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/Textpic.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/YoutubeVideo.html b/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/YoutubeVideo.html deleted file mode 100644 index 816f874..0000000 --- a/packages/ep_theme/Resources/Private/Templates/FluidStyledContent/YoutubeVideo.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -
- -
-
- Bitte Marketing-Cookies akzeptieren, um dieses Video anzusehen. -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Form/Form.html b/packages/ep_theme/Resources/Private/Templates/Form/Form.html deleted file mode 100644 index ef9d15c..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Form/Form.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -
- -
-
-
- diff --git a/packages/ep_theme/Resources/Private/Templates/Form/Render.html b/packages/ep_theme/Resources/Private/Templates/Form/Render.html deleted file mode 100644 index cf636c9..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Form/Render.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -
- -
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Gridelements/HalfAndTwoQuarters.html b/packages/ep_theme/Resources/Private/Templates/Gridelements/HalfAndTwoQuarters.html deleted file mode 100644 index d7a52a9..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Gridelements/HalfAndTwoQuarters.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -
-
- {data.tx_gridelements_view_column_51 -> f:format.raw()} -
-
-
-
- {data.tx_gridelements_view_column_52 -> f:format.raw()} -
-
- {data.tx_gridelements_view_column_53 -> f:format.raw()} -
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Gridelements/Halves.html b/packages/ep_theme/Resources/Private/Templates/Gridelements/Halves.html deleted file mode 100644 index 43a4f10..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Gridelements/Halves.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - -
- -
- {data.tx_gridelements_view_column_21 -> f:format.raw()} -
-
- -
- {data.tx_gridelements_view_column_22 -> f:format.raw()} -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Gridelements/Quarters.html b/packages/ep_theme/Resources/Private/Templates/Gridelements/Quarters.html deleted file mode 100644 index 4ba7caf..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Gridelements/Quarters.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - -
- {data.tx_gridelements_view_column_41 -> f:format.raw()} - {data.tx_gridelements_view_column_42 -> f:format.raw()} - {data.tx_gridelements_view_column_43 -> f:format.raw()} - {data.tx_gridelements_view_column_44 -> f:format.raw()} -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Gridelements/Thirds.html b/packages/ep_theme/Resources/Private/Templates/Gridelements/Thirds.html deleted file mode 100644 index cbb4ec1..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Gridelements/Thirds.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - -
- {data.tx_gridelements_view_column_31 -> f:format.raw()} - {data.tx_gridelements_view_column_32 -> f:format.raw()} - {data.tx_gridelements_view_column_33 -> f:format.raw()} -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Gridelements/TwoQuartersAndHalf.html b/packages/ep_theme/Resources/Private/Templates/Gridelements/TwoQuartersAndHalf.html deleted file mode 100644 index 3d349ce..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Gridelements/TwoQuartersAndHalf.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -
-
-
-
- {data.tx_gridelements_view_column_52 -> f:format.raw()} -
-
- {data.tx_gridelements_view_column_53 -> f:format.raw()} -
-
-
-
- {data.tx_gridelements_view_column_51 -> f:format.raw()} -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html b/packages/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html deleted file mode 100644 index 6dc6ec4..0000000 --- a/packages/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html +++ /dev/null @@ -1,37 +0,0 @@ - - -
-

- {hotel.name} - Preisberechnung & direkt buchen -

- - - - - -
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Hotel/DateIndependentTeasergroup.html b/packages/ep_theme/Resources/Private/Templates/Hotel/DateIndependentTeasergroup.html deleted file mode 100644 index ce12341..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Hotel/DateIndependentTeasergroup.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - -
- -
-
-
    - -
  • - -
  • -
    -
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Hotel/Detail.html b/packages/ep_theme/Resources/Private/Templates/Hotel/Detail.html deleted file mode 100644 index 41a4977..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Hotel/Detail.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -
- -
-
- -
-
- - - - - -
-

Lage

-
- -
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Hotel/DetailEvent.html b/packages/ep_theme/Resources/Private/Templates/Hotel/DetailEvent.html deleted file mode 100644 index 1a0b51c..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Hotel/DetailEvent.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -
-
- -
-
- {hotel.description -> f:format.html()} -
-
-
- -

Buchungsoptionen

-
- -
-
-

Ausstattung

- {hotel.features -> f:format.html()} -

Zimmerarten / Apartments

- {hotel.roomTypes -> f:format.html()} - -

Zusatzinformationen

- {hotel.additionalInformation -> f:format.html()} -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Hotel/Teasergroup.html b/packages/ep_theme/Resources/Private/Templates/Hotel/Teasergroup.html deleted file mode 100644 index 86090cb..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Hotel/Teasergroup.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - -
-
- - -
-
- - - - - - -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Map/General.html b/packages/ep_theme/Resources/Private/Templates/Map/General.html deleted file mode 100644 index f829c83..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Map/General.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/News/News/Detail.html b/packages/ep_theme/Resources/Private/Templates/News/News/Detail.html deleted file mode 100644 index a600b03..0000000 --- a/packages/ep_theme/Resources/Private/Templates/News/News/Detail.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - {newsItem.alternativeTitle} - - - - - {newsItem.title} - - - - - -
-

- {newsItem.title} -

-

- {newsItem.author} am - - in - - - {tag.title} - - {f:if(condition: iteration.isLast, else: ', ')} - - -

- -

- {newsItem.teaser} -

-
-
- - - {newsItem.bodytext} - -
- {newsItem.contentElementIdList} -
-
-
-
-
- -

- Dateien -

- -
- -

- Ähnliche Beiträge -

- - - -
- - - - - -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/News/News/List.html b/packages/ep_theme/Resources/Private/Templates/News/News/List.html deleted file mode 100644 index d7246b4..0000000 --- a/packages/ep_theme/Resources/Private/Templates/News/News/List.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - -

- Blog: {tags.0.title} -

-
- -

- Blog -

-
-
-
- - - - - - - - - - - - - - -
- -
- -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/News/Tag/List.html b/packages/ep_theme/Resources/Private/Templates/News/Tag/List.html deleted file mode 100644 index 5db40bb..0000000 --- a/packages/ep_theme/Resources/Private/Templates/News/Tag/List.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - -

Themen

-
    - -
  • - - - - - {tag.title} - -
  • -
    -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/News/ViewHelpers/Widget/Paginate/Index.html b/packages/ep_theme/Resources/Private/Templates/News/ViewHelpers/Widget/Paginate/Index.html deleted file mode 100644 index 34a0f6f..0000000 --- a/packages/ep_theme/Resources/Private/Templates/News/ViewHelpers/Widget/Paginate/Index.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Newsletter/Index.html b/packages/ep_theme/Resources/Private/Templates/Newsletter/Index.html deleted file mode 100644 index 043bc54..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Newsletter/Index.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - -
- - -
Du hast Deine E-Mail-Adresse erfolgreich abgemeldet und erhältst in - Zukunft von uns keinen Newsletter mehr.
-
- -
Parameterfehler - Deine E-Mail-Adresse konnte leider nicht - abgemeldet werden.
Sollte dieser Fehler weiterhin auftreten, setze Dich bitte telefonisch mit - uns in Verbindung.
-
- -
Vielen Dank - Du hast Deine E-Mail-Adresse erfolgreich für - unseren Newsletter registriert.
-
- -
Parameterfehler - Deine E-Mail-Adresse konnte leider nicht - korrekt registriert werden.
Sollte dieser Fehler weiterhin auftreten, setze Dich bitte - telefonisch mit uns in Verbindung.
-
- -
Vielen Dank für Dein Interesse - Du erhältst in Kürze - eine Mail mit einem Bestätigungslink an Deine E-Mail-Adresse geschickt.
-
- -
Deine E-Mail-Adresse ist bereits für unseren Newsletter - vorgemerkt - es fehlt nur noch Deine Bestätigung. Solltest Du noch keine Mail erhalten haben, prüfe - bitte auch die Spam-Einstellungen Deines Posteingangs.
-
- -
Diese E-Mail-Adresse ist bereits für unseren Newsletter registriert.
-
- -
Ein Problem ist aufgetreten. Bitte versuche es erneut.
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Newsletter/SubscriptionForm.html b/packages/ep_theme/Resources/Private/Templates/Newsletter/SubscriptionForm.html deleted file mode 100644 index c66150f..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Newsletter/SubscriptionForm.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -
- -
-
- - - -
- - - - - - -
- -
-
-
- - - - - -

- News & Angebote per Mail -

-
- - - - - -

- Benachrichtige mich bei Verfügbarkeit -

-
-
-
-
- -
- - - -
-
-
-
- -
-
-
-
-
- - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Newsletter/SubscriptionFormSubmit.html b/packages/ep_theme/Resources/Private/Templates/Newsletter/SubscriptionFormSubmit.html deleted file mode 100644 index 3e55f69..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Newsletter/SubscriptionFormSubmit.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - -
-
-

- Vielen Dank für dein Interesse -

-

- Deine Anmeldung muss noch bestätigt werden. Bitte nutze den Link aus der Bestätigungs-E-Mail, die in - Kürze bei dir eintreffen sollte. -

-

- Sieh am besten auch im Spam-Ordner nach. -

-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/Frontpage.html b/packages/ep_theme/Resources/Private/Templates/Page/Frontpage.html deleted file mode 100644 index 4bf1a73..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/Frontpage.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/FrontpageEvent.html b/packages/ep_theme/Resources/Private/Templates/Page/FrontpageEvent.html deleted file mode 100644 index 2a9a0b3..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/FrontpageEvent.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/Popup.html b/packages/ep_theme/Resources/Private/Templates/Page/Popup.html deleted file mode 100644 index 9a5aa8e..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/Popup.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/Search.html b/packages/ep_theme/Resources/Private/Templates/Page/Search.html deleted file mode 100644 index 1001ea8..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/Search.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarLeft.html b/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarLeft.html deleted file mode 100644 index f045f3f..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarLeft.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - |'}" /> - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarLeftEvent.html b/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarLeftEvent.html deleted file mode 100644 index cfdc0be..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarLeftEvent.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - |'}" /> - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarRightEvent.html b/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarRightEvent.html deleted file mode 100644 index c5b6ab8..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/SubpageSidebarRightEvent.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - |'}" /> - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Page/Travelinfo.html b/packages/ep_theme/Resources/Private/Templates/Page/Travelinfo.html deleted file mode 100644 index a74b139..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Page/Travelinfo.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Password/Index.html b/packages/ep_theme/Resources/Private/Templates/Password/Index.html deleted file mode 100644 index 6d6fd87..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Password/Index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -
-
- -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Disrupter.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Disrupter.html deleted file mode 100644 index e97e2f9..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Disrupter.html +++ /dev/null @@ -1,11 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Störer -

- - {content.headline} - -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Disturber.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Disturber.html deleted file mode 100644 index 960ae76..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Disturber.html +++ /dev/null @@ -1,24 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Störer -

- - - - groß - > - - Event klein - - - Event groß - - - klein - - - -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Gmap.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Gmap.html deleted file mode 100644 index dcb9ca0..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Gmap.html +++ /dev/null @@ -1,11 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- OSM Karte -

- - {content.name} ({content.latitude}, {content.longitude}) - -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Lineup.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Lineup.html deleted file mode 100644 index d91851c..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/Lineup.html +++ /dev/null @@ -1,15 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Lineup -

-
    - -
  • - {row.name} -
  • -
    -
-
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserBookingLink.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserBookingLink.html deleted file mode 100644 index e12ce44..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserBookingLink.html +++ /dev/null @@ -1,23 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Teaser Buchungslink -

-

- - - - - - - - -

- - {product.name} - -
- {product.teaser -> f:format.html()} -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserCity.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserCity.html deleted file mode 100644 index b9a1206..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserCity.html +++ /dev/null @@ -1,23 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Teaser Ort -

-

- - - - - - - - -

- - {city.name} - -
- {city.teaser -> f:format.html()} -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserConcept.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserConcept.html deleted file mode 100644 index cb8d844..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserConcept.html +++ /dev/null @@ -1,23 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Teaser Konzept -

-

- - - - - - - - -

- - {concept.name} - -
- {concept.teaser -> f:format.html()} -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserCountry.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserCountry.html deleted file mode 100644 index 126aa0e..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserCountry.html +++ /dev/null @@ -1,23 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Teaser Land -

-

- - - - - - - - -

- - {country.name} - -
- {country.teaser -> f:format.html()} -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserHotel.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserHotel.html deleted file mode 100644 index 731bdff..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserHotel.html +++ /dev/null @@ -1,23 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Teaser Hotel -

-

- - - - - - - - -

- - {hotel.name} - -
- {hotel.teaser -> f:format.html()} -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserProduct.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserProduct.html deleted file mode 100644 index 40feb7c..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserProduct.html +++ /dev/null @@ -1,23 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Teaser Produkt -

-

- - - - - - - - -

- - {product.name} - -
- {product.teaser -> f:format.html()} -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserRegion.html b/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserRegion.html deleted file mode 100644 index 8ad9aa6..0000000 --- a/packages/ep_theme/Resources/Private/Templates/PreviewRenderer/TeaserRegion.html +++ /dev/null @@ -1,23 +0,0 @@ -{namespace be=TYPO3\CMS\Backend\ViewHelpers} -
-
-

- Teaser Gebiet -

-

- - - - - - - - -

- - {region.name} - -
- {region.teaser -> f:format.html()} -
-
diff --git a/packages/ep_theme/Resources/Private/Templates/Pricetable/Event.html b/packages/ep_theme/Resources/Private/Templates/Pricetable/Event.html deleted file mode 100644 index bcd6f42..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Pricetable/Event.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -
- -
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Region/Detail.html b/packages/ep_theme/Resources/Private/Templates/Region/Detail.html deleted file mode 100644 index ad9d8f5..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Region/Detail.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - -
- -
-
- -
-
- - - - - - - - -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Region/Teasergroup.html b/packages/ep_theme/Resources/Private/Templates/Region/Teasergroup.html deleted file mode 100644 index b1a26cc..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Region/Teasergroup.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - -
- -
- - -
-
- - - -
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Reseller/Copypaste.html b/packages/ep_theme/Resources/Private/Templates/Reseller/Copypaste.html deleted file mode 100644 index 31eb070..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Reseller/Copypaste.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - -
-

Datenexport {productData.name}

-
- - - - - - - - - - - - - - - - - - - -
- zurück -
-
- - -
-
-

- -

-
- -
-
- - -
-
-

- -

-
- -
-
- - -
-
-

- -

-
- -
-
- - -
-
-

- -

-
- -
-
- - -
-
-

- -

-
- -
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Reseller/List.html b/packages/ep_theme/Resources/Private/Templates/Reseller/List.html deleted file mode 100644 index d8d72ef..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Reseller/List.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - -
- -

{reseller.name}

-

Gesamtexport XML

- - Export XML - -

Gesamtexport CSV (Facebook)

- - Export CSV (Google) - -

Gesamtexport CSV (Google)

- - Export CSV (Facebook) - -

Einzelexport für Copy&Paste

-
    - -
  • {product.nameInternal}
  • -
    -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Search/Searchresult.html b/packages/ep_theme/Resources/Private/Templates/Search/Searchresult.html deleted file mode 100644 index c5c760d..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Search/Searchresult.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - -
-
-
- -
- -
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Searchbar/Index.html b/packages/ep_theme/Resources/Private/Templates/Searchbar/Index.html deleted file mode 100644 index de17575..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Searchbar/Index.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - -
- data-searchbar-collapsed-value="true" - - data-action="datepicker:range-select->searchbar#setDateRange searchbar-toggle:toggle@window->searchbar#toggle"> - - - - - - - -
- - data-controller="sticky" - data-sticky-offset-value="650" - data-sticky-padding-value="7.5rem" - data-sticky-disabled-value="false" - data-sticky-classes-value="sticky reduced" - - - data-searchbar-target="container"> -
-
-
- -
-
- - - - - -
-
- -
-
- - - - - -
-
- -
-
- - - - - -
-
- -
-
- - - - - -
-
- -
- -
-
- - -
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Snowreport/List.html b/packages/ep_theme/Resources/Private/Templates/Snowreport/List.html deleted file mode 100644 index 1da3b32..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Snowreport/List.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -
- -
-
- {ep:icon(icon: 'flag-{snowreport.countryCode -> f:format.case(mode: \'lower\')}', class: 'w-8 h-6')} - - {snowreport.regionName} - -
-
- - -
    -
  • - Berg/Tal: {snowreport.snow_level_mountain -> v:or(alternative: '-')}/{snowreport.snow_level_valley -> v:or(alternative: '-')} cm -
  • -
  • - Qualität: {snowreport.snow_quality} -
  • -
  • - Geöffnete Lifte: {snowreport.lifts_opened}/{snowreport.lifts_total}keine Angabe -
  • -
  • - Letzter Schneefall: {f:if(condition: snowreport.last_snowfall, then: '{snowreport.last_snowfall -> f:format.date(format: \'%d.%m.%Y\')}', else: 'keine Angabe')} -
  • -
  • - Letzte Akt.: {snowreport.last_update -> f:format.date(format: '%d.%m.%Y')} -
  • -
-
- - Saison vom {snowreport.seasonStart -> f:format.date(format: '%d.%m.%Y')} bis {snowreport.seasonEnd -> f:format.date(format: '%d.%m.%Y')} - -
-
-
-
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Team/List.html b/packages/ep_theme/Resources/Private/Templates/Team/List.html deleted file mode 100644 index d3edd32..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Team/List.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - -
- -
- - - -
-
-
-
- - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Team/Show.html b/packages/ep_theme/Resources/Private/Templates/Team/Show.html deleted file mode 100644 index 645862b..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Team/Show.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -
-
-
- - - -
-
- -
- {member.description -> f:format.html()} -
- -
- - - - - - {member.email} - - - - - - - - {member.phone} - - -
-
- - zurück - -
-
-
-
- - diff --git a/packages/ep_theme/Resources/Private/Templates/Travelinfo/TravelCode.html b/packages/ep_theme/Resources/Private/Templates/Travelinfo/TravelCode.html deleted file mode 100644 index 9015bcd..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Travelinfo/TravelCode.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Travelinfo/TravelInfo.html b/packages/ep_theme/Resources/Private/Templates/Travelinfo/TravelInfo.html deleted file mode 100644 index 9015bcd..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Travelinfo/TravelInfo.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/packages/ep_theme/Resources/Private/Templates/Watchlist/List.html b/packages/ep_theme/Resources/Private/Templates/Watchlist/List.html deleted file mode 100644 index ccb69c5..0000000 --- a/packages/ep_theme/Resources/Private/Templates/Watchlist/List.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -
-
- -
-
-
- - diff --git a/packages/ep_theme/ext_localconf.php b/packages/ep_theme/ext_localconf.php index 453750a..bf30333 100644 --- a/packages/ep_theme/ext_localconf.php +++ b/packages/ep_theme/ext_localconf.php @@ -5,41 +5,6 @@ $boot = function () { $GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['ep'] = ['Ep\\EpTheme\\ViewHelpers']; $GLOBALS['TYPO3_CONF_VARS']['LOG']['TYPO3']['CMS']['deprecations']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::NOTICE] = []; - $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\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; - $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] = 'tx_eptheme_slides'; $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:ep_theme/Configuration/RTE/Default.yaml'; @@ -47,8 +12,6 @@ $boot = function () { $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['ep-minimal'] = 'EXT:ep_theme/Configuration/RTE/Minimal.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']['MAIL']['format'] = 'html'; $metaTagManagerRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::class); diff --git a/packages/ep_theme/ext_tables.php b/packages/ep_theme/ext_tables.php index 7e4d164..66e68cb 100644 --- a/packages/ep_theme/ext_tables.php +++ b/packages/ep_theme/ext_tables.php @@ -9,9 +9,7 @@ call_user_func(function () { $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= 'og_image'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_slide'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_lineup'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_badge'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_addresscheck'); if (TYPO3_MODE === 'BE') { $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); @@ -22,18 +20,4 @@ call_user_func(function () { ); } - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'EP.EpTheme', - 'web', - 'management', - 'after:list', - [ - 'Backend' => 'listPages', - ], - [ - 'access' => 'user,group', - 'labels' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_mod.xlf', - 'icon' => 'EXT:ep_products/Resources/Public/Icons/logo.svg' - ] - ); });