feat: boot TYPO3 13 with site configs and the theme build
- Site configs for the seven live sites from EP/website, Development base variants on *-ep13.ddev.site (DDEV additional_hostnames) - Webpack Encore build moved to the root, output in packages/ep_theme/Resources/Public, public path /_assets/<hash> - Search UI removed from the kept layouts and partials, as the static export already does - Daytrip room selection and the contingent chain removed (contingent import is not ported; no daytrip product has current contingents) - f:uri.action is final in v13: Uri\AjaxViewHelper invokes it - Remaining QueryBuilder::execute() and array logicalAnd() calls, addRootLineFields, TSFE getData, legacy typo3conf/ext template path - Rector skips the plugin-to-CType rules; plugins stay list_type Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
41b9302d9b
commit
a598339f67
56 files changed
+10844
-1348
No files matched your search
@@ -34,13 +34,11 @@ use EP\EpProducts\Domain\Model\Hotel;
|
||||
use EP\EpProducts\Domain\Model\Product;
|
||||
use EP\EpProducts\Domain\Repository\InfoboxRepository;
|
||||
use EP\EpProducts\Domain\Repository\ProductRepository;
|
||||
use EP\EpProducts\Service\ContingentDataService;
|
||||
use EP\EpProducts\Service\DateService;
|
||||
use EP\EpProducts\Service\FilterService;
|
||||
use EP\EpProducts\Service\MyEpUrlResolverService;
|
||||
use EP\EpProducts\Service\ResellerDataService;
|
||||
use EP\EpProducts\Traits\RequestArgumentTypeConversionTrait;
|
||||
use League\Period\Period;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
@@ -75,11 +73,6 @@ class AjaxTableController extends ActionController
|
||||
*/
|
||||
protected $resellerDataService;
|
||||
|
||||
/**
|
||||
* @var ContingentDataService
|
||||
*/
|
||||
protected $contingentDataService;
|
||||
|
||||
/**
|
||||
* @var MyEpUrlResolverService
|
||||
*/
|
||||
@@ -91,7 +84,6 @@ class AjaxTableController extends ActionController
|
||||
* @param DateService $dateService
|
||||
* @param FilterService $filterService
|
||||
* @param ResellerDataService $resellerDataService
|
||||
* @param ContingentDataService $contingentDataService
|
||||
* @param MyEpUrlResolverService $myEpUrlResolverService
|
||||
*/
|
||||
public function __construct(
|
||||
@@ -100,7 +92,6 @@ class AjaxTableController extends ActionController
|
||||
DateService $dateService,
|
||||
FilterService $filterService,
|
||||
ResellerDataService $resellerDataService,
|
||||
ContingentDataService $contingentDataService,
|
||||
MyEpUrlResolverService $myEpUrlResolverService
|
||||
) {
|
||||
$this->productRepository = $productRepository;
|
||||
@@ -108,7 +99,6 @@ class AjaxTableController extends ActionController
|
||||
$this->dateService = $dateService;
|
||||
$this->filterService = $filterService;
|
||||
$this->resellerDataService = $resellerDataService;
|
||||
$this->contingentDataService = $contingentDataService;
|
||||
$this->myEpUrlResolverService = $myEpUrlResolverService;
|
||||
}
|
||||
|
||||
@@ -133,8 +123,8 @@ class AjaxTableController extends ActionController
|
||||
public function datestableAction(
|
||||
Product $product,
|
||||
Hotel $hotel,
|
||||
string $dateFrom = null,
|
||||
string $dateTo = null
|
||||
?string $dateFrom = null,
|
||||
?string $dateTo = null
|
||||
): ResponseInterface {
|
||||
$forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true);
|
||||
$filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids);
|
||||
@@ -343,36 +333,6 @@ class AjaxTableController extends ActionController
|
||||
return $this->htmlResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Hotel $hotel
|
||||
* @param Product $product
|
||||
* @param string $dateFrom
|
||||
* @param string $dateTo
|
||||
*/
|
||||
public function daytripRoomsAction(
|
||||
Hotel $hotel,
|
||||
Product $product,
|
||||
string $dateFrom,
|
||||
string $dateTo
|
||||
): ResponseInterface {
|
||||
$period = new Period($dateFrom, $dateTo);
|
||||
$nights = (int) $period->dateInterval()->format('%a') + 1;
|
||||
$myEpUrl = $this->myEpUrlResolverService->resolve();
|
||||
|
||||
if (2 > $nights) {
|
||||
$rooms = [];
|
||||
} else {
|
||||
$rooms = $this
|
||||
->contingentDataService
|
||||
->getAvailableRooms($dateFrom, $dateTo, $hotel, $product, $myEpUrl);
|
||||
}
|
||||
|
||||
$this->view->assign('nights', $nights);
|
||||
$this->view->assign('rooms', $rooms);
|
||||
$this->view->assign('myEpUrl', $myEpUrl);
|
||||
return $this->htmlResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Product $product
|
||||
* @return Infobox
|
||||
|
||||
@@ -33,7 +33,6 @@ use EP\EpProducts\Domain\Model\Product;
|
||||
use EP\EpProducts\Domain\Repository\HotelRepository;
|
||||
use EP\EpProducts\Domain\Repository\InfoboxRepository;
|
||||
use EP\EpProducts\Domain\Repository\ProductRepository;
|
||||
use EP\EpProducts\Service\ContingentDataService;
|
||||
use EP\EpProducts\Service\DateService;
|
||||
use EP\EpProducts\Service\FilterService;
|
||||
use EP\EpProducts\Service\HotelDataService;
|
||||
@@ -74,10 +73,6 @@ class ProductController extends ActionController
|
||||
* @var HotelDataService
|
||||
*/
|
||||
protected $hotelDataService;
|
||||
/**
|
||||
* @var ContingentDataService
|
||||
*/
|
||||
private $contingentDataService;
|
||||
|
||||
/**
|
||||
* @var InfoboxRepository
|
||||
@@ -94,7 +89,6 @@ class ProductController extends ActionController
|
||||
* @param ProductDataService $productDataService
|
||||
* @param HotelRepository $hotelRepository
|
||||
* @param HotelDataService $hotelDataService
|
||||
* @param ContingentDataService $contingentDataService
|
||||
* @param DateService $dateService
|
||||
* @param FilterService $filterService
|
||||
* @param InfoboxRepository $infoboxRepository
|
||||
@@ -105,7 +99,6 @@ class ProductController extends ActionController
|
||||
ProductDataService $productDataService,
|
||||
HotelRepository $hotelRepository,
|
||||
HotelDataService $hotelDataService,
|
||||
ContingentDataService $contingentDataService,
|
||||
DateService $dateService,
|
||||
FilterService $filterService,
|
||||
InfoboxRepository $infoboxRepository,
|
||||
@@ -115,7 +108,6 @@ class ProductController extends ActionController
|
||||
$this->productDataService = $productDataService;
|
||||
$this->hotelRepository = $hotelRepository;
|
||||
$this->hotelDataService = $hotelDataService;
|
||||
$this->contingentDataService = $contingentDataService;
|
||||
$this->dateService = $dateService;
|
||||
$this->filterService = $filterService;
|
||||
$this->infoboxRepository = $infoboxRepository;
|
||||
@@ -131,8 +123,8 @@ class ProductController extends ActionController
|
||||
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
|
||||
*/
|
||||
public function detailAction(
|
||||
Product $product = null,
|
||||
Hotel $hotel = null,
|
||||
?Product $product = null,
|
||||
?Hotel $hotel = null,
|
||||
$dateFrom = null,
|
||||
$dateTo = null
|
||||
) {
|
||||
@@ -172,14 +164,6 @@ class ProductController extends ActionController
|
||||
}
|
||||
}
|
||||
|
||||
if ($product->isDaytrip()) {
|
||||
$availableContingents = $this
|
||||
->contingentDataService
|
||||
->getAvailableContingents($hotel, $product)
|
||||
;
|
||||
$enabledDates = array_keys($availableContingents);
|
||||
}
|
||||
|
||||
$concept = $product->getConcept();
|
||||
$excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true);
|
||||
$isProductWithExcludedConcept = ($concept !== null) && \in_array($concept->getUid(), $excludedConceptUids);
|
||||
@@ -196,7 +180,8 @@ class ProductController extends ActionController
|
||||
$this->view->assignMultiple([
|
||||
'hotel' => $hotel,
|
||||
'product' => $product,
|
||||
'enabledDates' => $enabledDates ?? [],
|
||||
// Daytrip availability came from the contingent import, which is not ported
|
||||
'enabledDates' => [],
|
||||
'isProductWithExcludedConcept' => $isProductWithExcludedConcept,
|
||||
'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept,
|
||||
'isProductWithGroupInquiryForm' => $isProductWithGroupInquiryForm,
|
||||
|
||||
@@ -1,353 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Domain\Model;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Björn Fromme <[email protected]>, 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 CalendR\Event\EventInterface;
|
||||
use CalendR\Period\PeriodInterface;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
|
||||
class Contingent extends AbstractEntity implements EventInterface
|
||||
{
|
||||
const STATUS_OK = 0;
|
||||
const STATUS_BLOCKED = 1;
|
||||
const STATUS_ONREQUEST = 2;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
protected $date;
|
||||
|
||||
/**
|
||||
* @var Hotel
|
||||
*/
|
||||
protected $hotel;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $roomCode;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $roomLabel;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $pax;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $available;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $status;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $minPrice;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $minNights;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $additionalNightMinPrice;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $additionalNightMinNights;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return Contingent
|
||||
*/
|
||||
public static function fromArray(array $data)
|
||||
{
|
||||
$event = new self;
|
||||
|
||||
$event->setPax($data['pax']);
|
||||
$event->setAvailable($data['available']);
|
||||
$event->setDate(new \DateTime($data['date']));
|
||||
$event->setStatus($data['status']);
|
||||
|
||||
if ($data['hotel'] instanceof Hotel) {
|
||||
$event->setHotel($data['hotel']);
|
||||
}
|
||||
|
||||
return $event;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $date
|
||||
*/
|
||||
public function setDate(\DateTime $date)
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Hotel
|
||||
*/
|
||||
public function getHotel()
|
||||
{
|
||||
return $this->hotel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Hotel $hotel
|
||||
*/
|
||||
public function setHotel($hotel)
|
||||
{
|
||||
$this->hotel = $hotel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRoomCode()
|
||||
{
|
||||
return $this->roomCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $roomCode
|
||||
*/
|
||||
public function setRoomCode($roomCode)
|
||||
{
|
||||
$this->roomCode = $roomCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRoomLabel()
|
||||
{
|
||||
return $this->roomLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $roomLabel
|
||||
*/
|
||||
public function setRoomLabel($roomLabel)
|
||||
{
|
||||
$this->roomLabel = $roomLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPax()
|
||||
{
|
||||
return $this->pax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $pax
|
||||
*/
|
||||
public function setPax($pax)
|
||||
{
|
||||
$this->pax = $pax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getAvailable()
|
||||
{
|
||||
return $this->available;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $available
|
||||
*/
|
||||
public function setAvailable($available)
|
||||
{
|
||||
$this->available = $available;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPercentageAvailable()
|
||||
{
|
||||
if ($this->pax === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return round($this->available / $this->pax * 100, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $status
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMinPrice()
|
||||
{
|
||||
return $this->minPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $minPrice
|
||||
*/
|
||||
public function setMinPrice($minPrice)
|
||||
{
|
||||
$this->minPrice = $minPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMinNights()
|
||||
{
|
||||
return $this->minNights;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $minNights
|
||||
*/
|
||||
public function setMinNights($minNights)
|
||||
{
|
||||
$this->minNights = $minNights;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getAdditionalNightMinPrice()
|
||||
{
|
||||
return $this->additionalNightMinPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $additionalNightMinPrice
|
||||
*/
|
||||
public function setAdditionalNightMinPrice($additionalNightMinPrice)
|
||||
{
|
||||
$this->additionalNightMinPrice = $additionalNightMinPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getAdditionalNightMinNights()
|
||||
{
|
||||
return $this->additionalNightMinNights;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $additionalNightMinNights
|
||||
*/
|
||||
public function setAdditionalNightMinNights($additionalNightMinNights)
|
||||
{
|
||||
$this->additionalNightMinNights = $additionalNightMinNights;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getBegin()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getEnd()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $datetime
|
||||
* @return bool
|
||||
*/
|
||||
public function contains(\DateTime $datetime)
|
||||
{
|
||||
return $datetime >= $this->getBegin() && $datetime < $this->getEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PeriodInterface $period
|
||||
* @return bool
|
||||
*/
|
||||
public function containsPeriod(PeriodInterface $period)
|
||||
{
|
||||
return $this->contains($period->getBegin()) && $this->contains($period->getEnd());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PeriodInterface $period
|
||||
* @return bool
|
||||
*/
|
||||
public function isDuring(PeriodInterface $period)
|
||||
{
|
||||
return $this->getBegin() >= $period->getBegin() && $this->getEnd() < $period->getEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getOccupancy()
|
||||
{
|
||||
return $this->getPax() - $this->getAvailable();
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ abstract class AbstractRepository extends Repository
|
||||
$orX = $qb->expr()->or();
|
||||
foreach ($filterSettings['priceRanges'] as $priceRange) {
|
||||
[ $priceMin, $priceMax ] = FilterOptions::$priceRangeOptions[$priceRange];
|
||||
$orX->add($qb->expr()->and($qb->expr()->gte(
|
||||
$orX = $orX->with($qb->expr()->and($qb->expr()->gte(
|
||||
'date.min_price',
|
||||
$qb->createNamedParameter($priceMin, Connection::PARAM_INT)
|
||||
), $qb->expr()->lt(
|
||||
|
||||
@@ -51,7 +51,7 @@ class CityRepository extends AbstractRepository
|
||||
}
|
||||
|
||||
return $query
|
||||
->matching($query->logicalAnd($constraints))
|
||||
->matching($query->logicalAnd(...$constraints))
|
||||
->execute()
|
||||
;
|
||||
}
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Domain\Repository;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Björn Fromme <[email protected]>, 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 CalendR\Event\EventInterface;
|
||||
use CalendR\Event\Provider\ProviderInterface;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use EP\EpProducts\Domain\Model\Contingent;
|
||||
use EP\EpProducts\Domain\Model\Hotel;
|
||||
use EP\EpProducts\Domain\Model\Product;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class ContingentRepository extends AbstractRepository implements ProviderInterface
|
||||
{
|
||||
/**
|
||||
* @return EventInterface[]
|
||||
*
|
||||
* @throws DBALException
|
||||
*/
|
||||
public function getEvents(\DateTime $begin, ?\DateTime $end = null, array $options = []): array
|
||||
{
|
||||
$optionsResolver = new OptionsResolver();
|
||||
$optionsResolver->setRequired(['hotel']);
|
||||
$optionsResolver->setAllowedTypes('hotel', Hotel::class);
|
||||
$resolvedOptions = $optionsResolver->resolve($options);
|
||||
|
||||
/** @var Hotel $hotel */
|
||||
$hotel = $resolvedOptions['hotel'];
|
||||
|
||||
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||
|
||||
$qb
|
||||
->select('c.status as status', 'c.date as date', 'c.min_price as minPrice', 'c.pax', 'c.available', 'c.room_code')
|
||||
->from('tx_epproducts_domain_model_contingent', 'c')
|
||||
->where('c.hotel = :hotelUid')
|
||||
->andWhere('c.date >= :dateFrom')
|
||||
->setParameter('hotelUid', $hotel->getUid())
|
||||
->setParameter('dateFrom', $begin->format('Y-m-d'))
|
||||
->orderBy('c.date')
|
||||
;
|
||||
|
||||
if (null !== $end) {
|
||||
$qb
|
||||
->andWhere('date <= :dateTo')
|
||||
->setParameter('dateTo', $end->format('Y-m-d'))
|
||||
;
|
||||
}
|
||||
|
||||
$result = $qb->execute()->fetchAllAssociative();
|
||||
|
||||
$dates = [];
|
||||
|
||||
foreach ($result as $row) {
|
||||
if (!\array_key_exists($row['date'], $dates)) {
|
||||
$dates[$row['date']] = [
|
||||
'status' => Contingent::STATUS_OK,
|
||||
'date' => $row['date'],
|
||||
'pax' => 0,
|
||||
'available' => 0,
|
||||
];
|
||||
}
|
||||
if (Contingent::STATUS_OK !== $row['status']) {
|
||||
$dates[$row['date']]['status'] = $row['status'];
|
||||
}
|
||||
if ('BelKal' !== $row['room_code']) {
|
||||
$dates[$row['date']]['pax'] += $row['pax'];
|
||||
$dates[$row['date']]['available'] += $row['available'];
|
||||
}
|
||||
}
|
||||
|
||||
$events = [];
|
||||
|
||||
foreach ($dates as $row) {
|
||||
$row['hotel'] = $hotel;
|
||||
$events[] = Contingent::fromArray($row);
|
||||
}
|
||||
|
||||
return $events;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws DBALException
|
||||
*/
|
||||
public function getAvailableContingents(Hotel $hotel, Product $product)
|
||||
{
|
||||
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||
|
||||
$qb
|
||||
->select('c.date as date', 'c.min_nights as minNights')
|
||||
->addSelectLiteral('SUM(c.available) as total')
|
||||
->addSelectLiteral('SUM(c.pax) as capacity')
|
||||
->from('tx_epproducts_domain_model_contingent', 'c')
|
||||
->innerJoin('c', 'tx_epproducts_domain_model_date', 'd', 'c.date = d.date_start AND c.hotel_code = d.hotel_code')
|
||||
->where('c.hotel = :hotelUid')
|
||||
->andWhere('d.product = :productUid')
|
||||
->andWhere('c.available > 0')
|
||||
->andWhere('c.min_price > 0')
|
||||
->setParameters([
|
||||
'hotelUid' => $hotel->getUid(),
|
||||
'productUid' => $product->getUid(),
|
||||
])
|
||||
->groupBy('c.date')
|
||||
->orderBy('c.date')
|
||||
;
|
||||
|
||||
return $qb->execute()->fetchAllAssociative();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws DBALException
|
||||
*/
|
||||
public function getAvailableRooms(string $dateFrom, string $dateTo, Hotel $hotel, Product $product)
|
||||
{
|
||||
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||
|
||||
$qb
|
||||
->select('c.date as date', 'c.room_code as code', 'c.room_label as label', 'c.available as available',
|
||||
'c.min_price as price', 'c.hotel_bus_pro_id as hotelBusProId', 'c.min_nights as minNights',
|
||||
'c.additional_night_min_price as additionalNightPrice',
|
||||
'c.additional_night_min_nights as additionalNightMinNights', 'd.bus_pro_id as busProId',
|
||||
'd.services_included as servicesIncluded', 'd.services_general as servicesOptional',
|
||||
'd.skipass_included as skiPassIncluded', 'd.season as season')
|
||||
->from('tx_epproducts_domain_model_contingent', 'c')
|
||||
->innerJoin('c', 'tx_epproducts_domain_model_date', 'd', 'c.date = d.date_start AND c.hotel_code = d.hotel_code')
|
||||
->where('c.hotel = :hotelUid')
|
||||
->andWhere('d.product = :productUid')
|
||||
->andWhere('c.date >= :dateFrom')
|
||||
->andWhere('c.date <= :dateTo')
|
||||
->andWhere('c.min_price > 0')
|
||||
->setParameters([
|
||||
'hotelUid' => $hotel->getUid(),
|
||||
'productUid' => $product->getUid(),
|
||||
'dateFrom' => $dateFrom,
|
||||
'dateTo' => $dateTo,
|
||||
])
|
||||
->groupBy('c.room_code')
|
||||
->orderBy('c.pax')
|
||||
->addOrderBy('c.min_price')
|
||||
;
|
||||
|
||||
return $qb->execute()->fetchAllAssociative();
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,10 @@ class DateRepository extends AbstractRepository
|
||||
$query = $this->createQuery();
|
||||
|
||||
return $query
|
||||
->matching($query->logicalAnd([
|
||||
->matching($query->logicalAnd(
|
||||
$query->equals('product', $product),
|
||||
$query->equals('dateStart', $date),
|
||||
]))
|
||||
))
|
||||
->execute()
|
||||
;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class HotelRepository extends AbstractRepository
|
||||
->setMaxResults(1)
|
||||
;
|
||||
|
||||
return $qb->execute()->fetchAssociative();
|
||||
return $qb->executeQuery()->fetchAssociative();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,7 +78,7 @@ class HotelRepository extends AbstractRepository
|
||||
->setParameter('hotelUid', $hotelUid)
|
||||
;
|
||||
|
||||
return $qb->execute()->fetchAssociative();
|
||||
return $qb->executeQuery()->fetchAssociative();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,7 +49,7 @@ class ProductRepository extends AbstractRepository
|
||||
;
|
||||
|
||||
return $qb
|
||||
->execute()
|
||||
->executeQuery()
|
||||
->fetchAllAssociative()
|
||||
;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ class ProductRepository extends AbstractRepository
|
||||
$this->addFiltersettingsConditions($qb, $filterSettings);
|
||||
|
||||
return $qb
|
||||
->execute()
|
||||
->executeQuery()
|
||||
->fetchAllAssociative()
|
||||
;
|
||||
}
|
||||
@@ -192,12 +192,12 @@ class ProductRepository extends AbstractRepository
|
||||
}
|
||||
|
||||
return $qb
|
||||
->execute()
|
||||
->executeQuery()
|
||||
->fetchAllAssociative()
|
||||
;
|
||||
}
|
||||
|
||||
public function getPricetable(Product $product, Hotel $hotel, array $filterSettings, Date $date = null): array
|
||||
public function getPricetable(Product $product, Hotel $hotel, array $filterSettings, ?Date $date = null): array
|
||||
{
|
||||
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||
|
||||
@@ -254,7 +254,7 @@ class ProductRepository extends AbstractRepository
|
||||
$this->addFiltersettingsConditions($qb, $filterSettings);
|
||||
|
||||
return $qb
|
||||
->execute()
|
||||
->executeQuery()
|
||||
->fetchAllAssociative()
|
||||
;
|
||||
}
|
||||
@@ -305,7 +305,7 @@ class ProductRepository extends AbstractRepository
|
||||
$this->addFiltersettingsConditions($qb, $filterSettings, true);
|
||||
|
||||
return $qb
|
||||
->execute()
|
||||
->executeQuery()
|
||||
->fetchAllAssociative()
|
||||
;
|
||||
}
|
||||
@@ -363,7 +363,7 @@ class ProductRepository extends AbstractRepository
|
||||
;
|
||||
|
||||
return $qb
|
||||
->execute()
|
||||
->executeQuery()
|
||||
->fetchAllAssociative()
|
||||
;
|
||||
}
|
||||
@@ -400,7 +400,7 @@ class ProductRepository extends AbstractRepository
|
||||
;
|
||||
|
||||
return $qb
|
||||
->execute()
|
||||
->executeQuery()
|
||||
->fetchAllAssociative()
|
||||
;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class RegionRepository extends AbstractRepository
|
||||
}
|
||||
|
||||
return $query
|
||||
->matching($query->logicalAnd($constraints))
|
||||
->matching($query->logicalAnd(...$constraints))
|
||||
->execute()
|
||||
;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class Product
|
||||
public static function fromEntity
|
||||
(
|
||||
\EP\EpProducts\Domain\Model\Product $entity,
|
||||
array $imageProcessingInstructions = null,
|
||||
?array $imageProcessingInstructions = null,
|
||||
array $queryData = []
|
||||
)
|
||||
{
|
||||
|
||||
@@ -52,6 +52,11 @@ abstract class AbstractImageService implements SingletonInterface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $table;
|
||||
|
||||
public function __construct(FileRepository $fileRepository, ImageService $imageService, FrontendInterface $cache)
|
||||
{
|
||||
$this->fileRepository = $fileRepository;
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 Björn Fromme <[email protected]>, 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\Utility\BookingUrlUtility;
|
||||
use League\Period\Period;
|
||||
|
||||
class ContingentDataService
|
||||
{
|
||||
/**
|
||||
* @var ContingentRepository
|
||||
*/
|
||||
protected $contingentRepository;
|
||||
|
||||
/**
|
||||
* @param ContingentRepository $contingentRepository
|
||||
*/
|
||||
public function __construct(ContingentRepository $contingentRepository)
|
||||
{
|
||||
$this->contingentRepository = $contingentRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Hotel $hotel
|
||||
* @param Product $product
|
||||
* @return array
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
public function getAvailableContingents(Hotel $hotel, Product $product)
|
||||
{
|
||||
$data = $this->contingentRepository->getAvailableContingents($hotel, $product);
|
||||
$contingents = [];
|
||||
foreach ($data as $row) {
|
||||
$contingents[$row['date']] = [
|
||||
'date' => $row['date'],
|
||||
'minNights' => $row['minNights'],
|
||||
'total' => $row['total'],
|
||||
'capacity' => $row['capacity'],
|
||||
];
|
||||
}
|
||||
|
||||
return $contingents;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dateFrom
|
||||
* @param string $dateTo
|
||||
* @param Hotel $hotel
|
||||
* @param Product $product
|
||||
* @param string $myEpUrl
|
||||
* @return array
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
public function getAvailableRooms(
|
||||
string $dateFrom,
|
||||
string $dateTo,
|
||||
Hotel $hotel,
|
||||
Product $product,
|
||||
string $myEpUrl
|
||||
) {
|
||||
$data = $this->contingentRepository->getAvailableRooms($dateFrom, $dateTo, $hotel, $product);
|
||||
$period = new Period($dateFrom, $dateTo);
|
||||
$nights = $period->dateInterval()->format('%a');
|
||||
|
||||
$rooms = [];
|
||||
foreach ($data as $row) {
|
||||
$row['bookingUrl'] = BookingUrlUtility::generateUrl([
|
||||
'dateId' => $row['busProId'],
|
||||
'hotelId' => $row['hotelBusProId'],
|
||||
'myEpUrl' => $myEpUrl,
|
||||
]);
|
||||
|
||||
$row['summer'] = $row['season'] === 's';
|
||||
|
||||
$row['servicesIncluded'] = unserialize($row['servicesIncluded'], ['allowed_classes' => false]);
|
||||
$row['servicesOptional'] = unserialize($row['servicesOptional'], ['allowed_classes' => false]);
|
||||
|
||||
$row['priceForSelection'] = $row['price'] + ($nights - $row['minNights']) * $row['additionalNightPrice'];
|
||||
|
||||
$rooms[] = $row;
|
||||
}
|
||||
|
||||
return $rooms;
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class ResellerDataService implements SingletonInterface
|
||||
* @return array
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
public function preprocessAll(Reseller $reseller, string $myEpUrl, array $imageProcessingInstructions = null, $type = 'facebook')
|
||||
public function preprocessAll(Reseller $reseller, string $myEpUrl, ?array $imageProcessingInstructions = null, $type = 'facebook')
|
||||
{
|
||||
$data = [];
|
||||
$products = $reseller->getProducts();
|
||||
@@ -97,7 +97,7 @@ class ResellerDataService implements SingletonInterface
|
||||
Product $product,
|
||||
Reseller $reseller,
|
||||
string $myEpUrl,
|
||||
array $imageProcessingInstructions = null,
|
||||
?array $imageProcessingInstructions = null,
|
||||
$type = 'facebook'
|
||||
) {
|
||||
$queryData = 'google' !== $type ? [] : [
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace EP\EpProducts\Updates;
|
||||
|
||||
use TYPO3\CMS\Install\Attribute\UpgradeWizard;
|
||||
use TYPO3\CMS\Install\Updates\AbstractListTypeToCTypeUpdate;
|
||||
|
||||
#[UpgradeWizard('epEpProductsCTypeMigration')]
|
||||
final class EPEpProductsCTypeMigration extends AbstractListTypeToCTypeUpdate
|
||||
{
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Migrate "EP EpProducts" plugins to content elements.';
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'The "EP EpProducts" plugins are now registered as content element. Update migrates existing records and backend user permissions.';
|
||||
}
|
||||
|
||||
/**
|
||||
* This must return an array containing the "list_type" to "CType" mapping
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* [
|
||||
* 'pi_plugin1' => 'pi_plugin1',
|
||||
* 'pi_plugin2' => 'new_content_element',
|
||||
* ]
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function getListTypeToCTypeMapping(): array
|
||||
{
|
||||
return [
|
||||
// TODO: Add this mapping yourself!
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class SerializationUtility
|
||||
* @param array $processingInstructions
|
||||
* @return array
|
||||
*/
|
||||
public static function preprocessImages(ObjectStorage $images, array $processingInstructions = null)
|
||||
public static function preprocessImages(ObjectStorage $images, ?array $processingInstructions = null)
|
||||
{
|
||||
$data = [];
|
||||
foreach ($images as $file)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
|
||||
|
||||
return [
|
||||
'ep-logo' => [
|
||||
'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
||||
'provider' => SvgIconProvider::class,
|
||||
'source' => 'EXT:ep_products/Resources/Public/Icons/logo.svg',
|
||||
],
|
||||
];
|
||||
@@ -1,224 +0,0 @@
|
||||
<?php
|
||||
|
||||
use EP\EpProducts\Service\LabelService;
|
||||
use EP\EpProducts\Domain\Model\Contingent;
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_contingent',
|
||||
'label' => 'date',
|
||||
'label_userFunc' => LabelService::class . '->getContingentLabel',
|
||||
'default_sortby' => 'ORDER BY date',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'dividers2tabs' => true,
|
||||
'versioningWS' => false,
|
||||
'hideTable' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'room_code,room_label',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'date, pax, available, status, min_price, hotel, room_code, room_label, groupsch_id'],
|
||||
],
|
||||
'palettes' => [],
|
||||
'columns' => [
|
||||
|
||||
'sys_language_uid' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => ['type' => 'language'],
|
||||
],
|
||||
'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' => [
|
||||
['label' => '', 'value' => 0],
|
||||
],
|
||||
'foreign_table' => 'tx_epproducts_domain_model_contingent',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_contingent.pid=###CURRENT_PID### AND tx_epproducts_domain_model_contingent.sys_language_uid IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'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' => 'datetime',
|
||||
'size' => 13,
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'datetime',
|
||||
'size' => 13,
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'pax' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Pax',
|
||||
'config' => [
|
||||
'type' => 'number',
|
||||
'size' => 3,
|
||||
'required' => true
|
||||
],
|
||||
],
|
||||
'available' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'verfügbar',
|
||||
'config' => [
|
||||
'type' => 'number',
|
||||
'size' => 3,
|
||||
'required' => true
|
||||
],
|
||||
],
|
||||
'date' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Datum',
|
||||
'config' => [
|
||||
'dbType' => 'date',
|
||||
'type' => 'datetime',
|
||||
'size' => 7,
|
||||
'checkbox' => 0,
|
||||
'format' => 'date',
|
||||
'required' => true,
|
||||
],
|
||||
],
|
||||
'hotel' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Unterkunft',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_hotel',
|
||||
'minitems' => 1,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'status' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Status',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'minitems' => 1,
|
||||
'maxitems' => 1,
|
||||
'items' => [
|
||||
[ 'label' => 'Ok', 'value' => Contingent::STATUS_OK ],
|
||||
[ 'label' => 'Buchungsstop', 'value' => Contingent::STATUS_BLOCKED ],
|
||||
[ 'label' => 'auf Anfrage', 'value' => Contingent::STATUS_ONREQUEST ],
|
||||
]
|
||||
],
|
||||
],
|
||||
'min_price' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'ab Preis',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
],
|
||||
],
|
||||
'min_nights' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'ab Preis Nächte',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
],
|
||||
],
|
||||
'additional_night_min_price' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'ab Preis Verlängerungsnacht',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
],
|
||||
],
|
||||
'additional_night_min_nights' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Verlängerungsnacht min. Nächte',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
],
|
||||
],
|
||||
'groupsch_id' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'groups.ch ID',
|
||||
'config' => [
|
||||
'type' => 'number',
|
||||
'size' => 8,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'room_code' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Zimmercode',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 8,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'room_label' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Zimmerbezeichnung',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -10,7 +10,7 @@ use EP\EpProducts\Log\Writer;
|
||||
defined('TYPO3') or die('Access denied.');
|
||||
|
||||
$boot = function () {
|
||||
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_cache'])) {
|
||||
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_cache'] ?? null)) {
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_cache'] = [];
|
||||
}
|
||||
|
||||
@@ -51,11 +51,11 @@ $boot = function () {
|
||||
'EpProducts',
|
||||
'ajax',
|
||||
[
|
||||
AjaxTableController::class => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms',
|
||||
AjaxTableController::class => 'datestable,pricetable,pricetableHtml,eventPricetable',
|
||||
AjaxTeaserPopupController::class => 'concept',
|
||||
],
|
||||
[
|
||||
AjaxTableController::class => 'datestable,pricetable,pricetableHtml,eventPricetable,daytripRooms',
|
||||
AjaxTableController::class => 'datestable,pricetable,pricetableHtml,eventPricetable',
|
||||
AjaxTeaserPopupController::class => 'concept',
|
||||
]
|
||||
);
|
||||
|
||||
@@ -124,7 +124,7 @@ class ContextProcessor implements DataProcessorInterface
|
||||
->setParameter('uid', $uid)
|
||||
;
|
||||
|
||||
return $query->execute()->fetch();
|
||||
return $query->executeQuery()->fetchAssociative();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -75,7 +75,7 @@ class SliderProcessor implements DataProcessorInterface
|
||||
->setParameter('pageUid', $pageUid)
|
||||
;
|
||||
|
||||
$slides = $query->execute()->fetchAll();
|
||||
$slides = $query->executeQuery()->fetchAllAssociative();
|
||||
|
||||
if ($slides) {
|
||||
$fileRepository = GeneralUtility::makeInstance(FileRepository::class);
|
||||
|
||||
@@ -24,11 +24,11 @@ class PageRepository extends Repository
|
||||
->setIncludeDeleted(false)
|
||||
->setRespectSysLanguage(false)
|
||||
;
|
||||
$query->matching($query->logicalAnd([
|
||||
$query->matching($query->logicalAnd(
|
||||
$query->equals('pid', $pid),
|
||||
$query->equals('doktype', CorePageRepository::DOKTYPE_DEFAULT),
|
||||
$query->equals('navHide', false),
|
||||
]));
|
||||
));
|
||||
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
@@ -27,37 +27,37 @@ namespace EP\EpTheme\ViewHelpers\Uri;
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use TYPO3\CMS\Core\Utility\RootlineUtility;
|
||||
use TYPO3\CMS\Fluid\ViewHelpers\Uri\ActionViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
|
||||
class AjaxViewHelper extends ActionViewHelper
|
||||
/**
|
||||
* f:uri.action for the AJAX plugin: picks the page type from the format and links to the
|
||||
* root page unless a page is given. The core ViewHelper is final, so it is invoked instead
|
||||
* of extended.
|
||||
*/
|
||||
class AjaxViewHelper extends AbstractViewHelper
|
||||
{
|
||||
|
||||
const PAGE_TYPE_JSON = 1701;
|
||||
const PAGE_TYPE_HTML = 1702;
|
||||
|
||||
public function initializeArguments()
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->overrideArgument('extensionName', 'string', 'Target extension name', false, 'epproducts');
|
||||
$this->overrideArgument('pluginName', 'string', 'Target plugin name', false, 'Ajax');
|
||||
$this->overrideArgument('format', 'string', 'The requested format', false, 'json');
|
||||
$this->registerArgument('action', 'string', 'Target action');
|
||||
$this->registerArgument('arguments', 'array', 'Arguments for the controller action', false, []);
|
||||
$this->registerArgument('controller', 'string', 'Target controller');
|
||||
$this->registerArgument('extensionName', 'string', 'Target extension name', false, 'epproducts');
|
||||
$this->registerArgument('pluginName', 'string', 'Target plugin name', false, 'Ajax');
|
||||
$this->registerArgument('pageUid', 'int', 'Target page, defaults to the root page');
|
||||
$this->registerArgument('format', 'string', 'The requested format, json or html', false, 'json');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic
|
||||
(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
public function render(): string
|
||||
{
|
||||
$arguments = $this->arguments;
|
||||
|
||||
// Determine page type from format argument
|
||||
if (strtolower(trim($arguments['format'])) === 'json') {
|
||||
$arguments['pageType'] = self::PAGE_TYPE_JSON;
|
||||
@@ -70,7 +70,9 @@ class AjaxViewHelper extends ActionViewHelper
|
||||
|
||||
// Use root page uid as target unless provided
|
||||
if ($arguments['pageUid'] === null) {
|
||||
$rootlineUtility = new RootlineUtility($GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.page.information')->getId());
|
||||
/** @var ServerRequestInterface $request */
|
||||
$request = $this->renderingContext->getAttribute(ServerRequestInterface::class);
|
||||
$rootlineUtility = new RootlineUtility($request->getAttribute('frontend.page.information')->getId());
|
||||
$rootline = $rootlineUtility->get();
|
||||
$rootPage = array_pop($rootline);
|
||||
$arguments['pageUid'] = $rootPage['uid'];
|
||||
@@ -79,10 +81,11 @@ class AjaxViewHelper extends ActionViewHelper
|
||||
// Force absolute urls
|
||||
$arguments['absolute'] = true;
|
||||
|
||||
return parent::renderStatic(
|
||||
return (string)$this->renderingContext->getViewHelperInvoker()->invoke(
|
||||
ActionViewHelper::class,
|
||||
$arguments,
|
||||
$renderChildrenClosure,
|
||||
$renderingContext
|
||||
$this->renderingContext,
|
||||
$this->buildRenderChildrenClosure()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
|
||||
|
||||
return [
|
||||
'content-ep_theme-ce' => [
|
||||
'provider' => SvgIconProvider::class,
|
||||
'source' => 'EXT:ep_theme/Resources/Public/images/logo.svg',
|
||||
],
|
||||
];
|
||||
@@ -3,6 +3,6 @@ tt_content.button {
|
||||
templateName = Button
|
||||
variables {
|
||||
referrerPid = TEXT
|
||||
referrerPid.data = TSFE:id
|
||||
referrerPid.data = page:uid
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ lib.dynamicContent {
|
||||
pageUid.cObject = TEXT
|
||||
pageUid.cObject {
|
||||
field = pageUid
|
||||
ifEmpty.data = TSFE:id
|
||||
ifEmpty.data = page:uid
|
||||
}
|
||||
contentFromPid.cObject = TEXT
|
||||
contentFromPid.cObject {
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
lib.searchBar = USER
|
||||
lib.searchBar {
|
||||
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
|
||||
extensionName = EpProducts
|
||||
pluginName = searchbar
|
||||
vendorName = EP
|
||||
controller = Searchbar
|
||||
action = index
|
||||
switchableControllerActions {
|
||||
Searchbar {
|
||||
1 = index
|
||||
}
|
||||
}
|
||||
settings =< plugin.tx_epproducts.settings
|
||||
settings.searchPageUid < plugin.tx_epproducts.settings.defaultSearchPageUid
|
||||
persistence =< plugin.tx_epproducts.persistence
|
||||
view =< plugin.tx_epproducts.view
|
||||
}
|
||||
|
||||
lib.searchBarCollapsed < lib.searchBar
|
||||
lib.searchBarCollapsed.settings.collapsed = 1
|
||||
@@ -90,7 +90,7 @@ page {
|
||||
cObject {
|
||||
data = levelfield: -1, backend_layout_next_level, slide
|
||||
override {
|
||||
data = TSFE:page|backend_layout
|
||||
data = page:backend_layout
|
||||
}
|
||||
|
||||
ifEmpty = Default
|
||||
@@ -100,7 +100,7 @@ page {
|
||||
1.wrap = |
|
||||
}
|
||||
|
||||
wrap = typo3conf/ext/ep_theme/Resources/Private/Templates/Page/|.html
|
||||
wrap = EXT:ep_theme/Resources/Private/Templates/Page/|.html
|
||||
case = ucfirst
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||
|
||||
<f:cObject typoscriptObjectPath="lib.searchBarCollapsed"/>
|
||||
<f:alias map="{searchbarCollapsed: 1}">
|
||||
<f:render partial="Topnav" arguments="{_all}"/>
|
||||
<f:render partial="Mainnav" section="Main" arguments="{_all}"/>
|
||||
</f:alias>
|
||||
<f:render partial="Topnav" arguments="{_all}"/>
|
||||
<f:render partial="Mainnav" section="Main" arguments="{_all}"/>
|
||||
<main id="main-content">
|
||||
<f:render section="Content"/>
|
||||
<f:render section="Teasers"/>
|
||||
@@ -17,7 +14,6 @@
|
||||
<aside>
|
||||
<f:render partial="ContactBar" arguments="{_all}"/>
|
||||
<f:render partial="Mobilenav" section="Main" arguments="{_all}"/>
|
||||
<f:render partial="Search/MobileSearch" arguments="{_all}"/>
|
||||
</aside>
|
||||
<f:render partial="Config" arguments="{_all}" />
|
||||
</html>
|
||||
@@ -5,11 +5,6 @@
|
||||
<f:render partial="Mainnav" section="Main" arguments="{_all}"/>
|
||||
<header>
|
||||
<f:render partial="HeaderSliderSmall" arguments="{_all}"/>
|
||||
<f:if condition="{data.tx_eptheme_hide_searchbar} || {settings.hideSearchbar}">
|
||||
<f:else>
|
||||
<f:cObject typoscriptObjectPath="lib.searchBar"/>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</header>
|
||||
<main id="main-content">
|
||||
<f:cObject typoscriptObjectPath="lib.breadcrumb"/>
|
||||
@@ -22,10 +17,5 @@
|
||||
<f:render partial="ContactBar" arguments="{_all}"/>
|
||||
<f:render partial="Topnav" arguments="{_all}"/>
|
||||
<f:render partial="Mobilenav" section="Main" arguments="{_all}"/>
|
||||
<f:if condition="{data.tx_eptheme_hide_searchbar} || {settings.hideSearchbar}">
|
||||
<f:else>
|
||||
<f:render partial="Search/MobileSearch" arguments="{_all}"/>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:render partial="Config" arguments="{_all}" />
|
||||
</html>
|
||||
@@ -5,11 +5,6 @@
|
||||
<f:render partial="Mainnav" section="Main" arguments="{_all}"/>
|
||||
<header>
|
||||
<f:render partial="HeaderSliderSmall" arguments="{_all}"/>
|
||||
<f:if condition="{data.tx_eptheme_hide_searchbar}">
|
||||
<f:else>
|
||||
<f:cObject typoscriptObjectPath="lib.searchBar"/>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</header>
|
||||
<main id="main-content">
|
||||
<f:cObject typoscriptObjectPath="lib.breadcrumb"/>
|
||||
@@ -30,6 +25,5 @@
|
||||
<f:render partial="ContactBar" arguments="{_all}"/>
|
||||
<f:render partial="Topnav" arguments="{_all}"/>
|
||||
<f:render partial="Mobilenav" section="Main" arguments="{_all}"/>
|
||||
<f:render partial="Search/MobileSearch" arguments="{_all}"/>
|
||||
<f:render partial="Config" arguments="{_all}" />
|
||||
</html>
|
||||
@@ -93,20 +93,6 @@
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
<f:if condition="{teasers -> f:count()} > 3">
|
||||
<f:if condition="{settings.hideMoreLink}">
|
||||
<f:else>
|
||||
<div class="text-right mt-4">
|
||||
<f:link.typolink class="button bg-button"
|
||||
parameter="{settings.defaultSearchPageUid}"
|
||||
additionalParams="f={filterSettings -> ep:filterSettingsEncoder()}"
|
||||
additionalAttributes="{rel: 'nofollow'}">
|
||||
Alle anzeigen
|
||||
</f:link.typolink>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:if>
|
||||
<f:if condition="{city.descriptionExtended}">
|
||||
|
||||
@@ -98,19 +98,6 @@
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{teasers -> f:count()} > 3">
|
||||
<f:if condition="{settings.hideMoreLink}">
|
||||
<f:else>
|
||||
<div class="text-right mt-4">
|
||||
<f:link.typolink class="button bg-button"
|
||||
parameter="{settings.defaultSearchPageUid}"
|
||||
additionalParams="f={filterSettings -> ep:filterSettingsEncoder()}">
|
||||
Alle anzeigen
|
||||
</f:link.typolink>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
||||
@@ -17,18 +17,6 @@
|
||||
<f:render section="FirstLevel" arguments="{_all}"/>
|
||||
</div>
|
||||
<div class="flex hover-hover:lg:hidden items-center space-x-4">
|
||||
<f:if condition="{settings.hideSearchbar}">
|
||||
<f:else>
|
||||
<button type="button"
|
||||
class="focus:outline-none text-zinc-800"
|
||||
aria-label="Reisen suchen"
|
||||
data-controller="overlay-toggle"
|
||||
data-overlay-toggle-id-value="mobile-search"
|
||||
data-action="overlay-toggle#invokeToggle">
|
||||
{ep:icon(icon: 'search', class: 'w-8 h-8 text-zinc-800')}
|
||||
</button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<button type="button"
|
||||
class="focus:outline-none text-zinc-800"
|
||||
aria-label="Navigation öffnen"
|
||||
@@ -73,27 +61,6 @@
|
||||
</f:if>
|
||||
</li>
|
||||
</f:for>
|
||||
<f:if condition="{data.tx_eptheme_hide_searchbar} || {settings.hideSearchbar}">
|
||||
<f:else>
|
||||
<li class="pb-4" role="none">
|
||||
<f:if condition="{searchbarCollapsed}">
|
||||
<f:then>
|
||||
<button type="button"
|
||||
aria-label="Suche anzeigen/ausblenden"
|
||||
data-controller="searchbar-toggle"
|
||||
data-action="searchbar-toggle#toggle">
|
||||
{ep:icon(icon: 'search', class: 'w-6 h-6')}
|
||||
</button>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:link.typolink parameter="{settings.defaultSearchPageUid}" title="zur Suche" additionalAttributes="{'role': 'menuitem'}">
|
||||
{ep:icon(icon: 'search', class: 'w-6 h-6')}
|
||||
</f:link.typolink>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</li>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</ul>
|
||||
</nav>
|
||||
</f:section>
|
||||
|
||||
@@ -17,18 +17,6 @@
|
||||
<f:image class="block h-10 lg:h-12 w-auto" src="{settings.logoImage}" alt="Bildmarke"/>
|
||||
</f:link.typolink>
|
||||
<div class="flex hover-hover:lg:hidden items-center space-x-4">
|
||||
<f:if condition="{data.tx_eptheme_hide_searchbar}">
|
||||
<f:else>
|
||||
<button type="button"
|
||||
class="focus:outline-none text-zinc-800"
|
||||
aria-label="Reisen suchen"
|
||||
data-controller="overlay-toggle"
|
||||
data-overlay-toggle-id-value="search"
|
||||
data-action="overlay-toggle#invokeToggle">
|
||||
{ep:icon(icon: 'search', class: 'w-8 h-8 text-zinc-800')}
|
||||
</button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<button type="button"
|
||||
class="focus:outline-none"
|
||||
aria-label="Navigation schließen"
|
||||
|
||||
@@ -124,19 +124,6 @@
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{teasers -> f:count()} > 3">
|
||||
<f:if condition="{settings.hideMoreLink}">
|
||||
<f:else>
|
||||
<div class="text-right mt-4">
|
||||
<f:link.typolink class="button bg-button"
|
||||
parameter="{settings.defaultSearchPageUid}"
|
||||
additionalParams="f={filterSettings -> ep:filterSettingsEncoder()}">
|
||||
Alle anzeigen
|
||||
</f:link.typolink>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true">
|
||||
|
||||
<div class="fixed hover-hover:lg:hidden top-0 left-0 inset-0 w-screen h-screen pt-14 hover-none:lg:pt-20 pb-10 z-50 bg-zinc-700 hidden"
|
||||
data-controller="mobile-search"
|
||||
data-mobile-search-uri-value="{ep:uri.ajax(controller: 'AjaxFilterPanel', action: 'index', pageUid: settings.defaultAjaxUid, format: 'html')}"
|
||||
data-mobile-search-init-uri-value="{ep:uri.ajax(controller: 'AjaxFilterPanel', action: 'index', pageUid: settings.defaultAjaxUid, arguments: '{filterSettings: filterSettings}', format: 'html')}"
|
||||
data-action="overlay-toggle:toggle@window->mobile-search#open datepicker:range-select->mobile-search#selectDateRange">
|
||||
<div class="fixed top-0 left-0 z-100 inset-x-0 px-4 py-2 hover-none:lg:py-4 flex justify-between bg-white shadow-md">
|
||||
<a href="{f:uri.typolink(parameter: settings.defaultHomeUid)}"
|
||||
class="block hover-hover:lg:pb-4"
|
||||
title="zur Startseite">
|
||||
<f:image class="block h-10 lg:h-12 w-auto" src="{settings.logoImage}" alt="Bildmarke"/>
|
||||
</a>
|
||||
<button type="button"
|
||||
aria-label="Suche schließen"
|
||||
class="focus:outline-none" data-action="mobile-search#close">
|
||||
{ep:icon(icon: 'close', class: 'w-8 h-8')}
|
||||
</button>
|
||||
</div>
|
||||
<div data-mobile-search-target="container"
|
||||
class="h-full w-full overflow-y-scroll px-4 pt-4 pb-24 bg-ep-primary-dark text-white">
|
||||
</div>
|
||||
<div class="fixed top-0 left-0 z-20 w-full h-full hidden"
|
||||
data-mobile-search-target="loadingIndicator">
|
||||
<div class="absolute top-1/2 left-1/2 -translate-xy-1/2 flex items-center space-x-4 bg-ep-secondary text-white text-lg p-4 rounded">
|
||||
{ep:icon(icon: 'spinner', class: 'w-6 h-6')}
|
||||
<span>Suche wird geladen...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
||||
@@ -1,126 +0,0 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:layout name="Default"/>
|
||||
|
||||
<f:section name="Main">
|
||||
<f:if condition="{nights} < 3">
|
||||
<f:then>
|
||||
<p class="font-bold">
|
||||
Bitte mindestens 2 Nächte auswählen.
|
||||
</p>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:render section="Table" arguments="{_all}"/>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:section>>
|
||||
|
||||
<f:section name="Table">
|
||||
<table class="w-full mb-4 bg-zinc-200 text-sm xl:text-base">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base">
|
||||
Zimmerart
|
||||
</th>
|
||||
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base">
|
||||
Preis
|
||||
</th>
|
||||
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base">
|
||||
inkl.
|
||||
</th>
|
||||
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{rooms}" as="row" iteration="iteration">
|
||||
<tr class="odd:bg-zinc-50 hover:bg-zinc-100 odd:hover:bg-zinc-100">
|
||||
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
|
||||
{row.label}
|
||||
</td>
|
||||
<td class="border-r border-zinc-200 px-2 py-1 md:p-2 whitespace-nowrap">
|
||||
ab {row.priceForSelection} €
|
||||
</td>
|
||||
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
|
||||
<f:if condition="{row.skiPassIncluded}">
|
||||
<span data-cooltipz-dir="top"
|
||||
aria-label="{f:if(condition: row.summer, then: 'Bergbahnticket inklusive', else: 'Skipass inklusive')}"
|
||||
role="tooltip">
|
||||
<svg class="w-4 h-4">
|
||||
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-tag"></use>
|
||||
</svg>
|
||||
</span>
|
||||
</f:if>
|
||||
<button type="button"
|
||||
data-action="daytrip#openModal"
|
||||
data-daytrip-type-param="services"
|
||||
data-daytrip-uid-param="{iteration.cycle}"
|
||||
data-cooltipz-dir="top"
|
||||
aria-label="Alle Inklusivleistungen anzeigen">
|
||||
<svg class="w-4 h-4">
|
||||
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-info-circle"></use>
|
||||
</svg>
|
||||
</button>
|
||||
</td>
|
||||
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
|
||||
<a class="button button--small bg-emerald-500 border-emerald-500"
|
||||
href="{row.bookingUrl}" target="_blank">
|
||||
Buchen
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="hidden fixed inset-0 w-full h-full z-50"
|
||||
data-controller="modal"
|
||||
data-action="daytrip:services-modal:open@window->modal#open">
|
||||
<div class="absolute inset-0 w-full h-full bg-black/85 z-25 flex items-center justify-center"
|
||||
data-action="click->modal#close"></div>
|
||||
<div class="absolute top-1/2 left-1/2 transform -translate-xy-1/2 bg-white shadow w-full max-w-xl rounded">
|
||||
<div class="shadow flex items-center justify-between p-4 bg-ep-primary-light text-white rounded-t">
|
||||
<span class="text-xl font-bold">
|
||||
Inklusivleistungen
|
||||
</span>
|
||||
<button type="button"
|
||||
class="inline-block"
|
||||
aria-label="schließen"
|
||||
data-action="modal#close">
|
||||
<svg class="w-8 h-8">
|
||||
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-close"></use>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4">
|
||||
<f:for each="{rooms}" as="row" iteration="iteration">
|
||||
<table class="hidden table table-striped"
|
||||
data-modal-target="content"
|
||||
data-uid="{iteration.cycle}">
|
||||
<tbody>
|
||||
<f:for each="{row.servicesIncluded}" as="service">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="flex items-center space-x-2">
|
||||
<svg class="w-6 h-6 text-ep-primary">
|
||||
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-check"></use>
|
||||
</svg>
|
||||
<span>
|
||||
{service}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
</table>
|
||||
</f:for>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -89,19 +89,6 @@
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{teasers -> f:count()} > 3">
|
||||
<f:if condition="{settings.hideMoreLink}">
|
||||
<f:else>
|
||||
<div class="text-right mt-4">
|
||||
<f:link.typolink class="button bg-button"
|
||||
parameter="{settings.defaultSearchPageUid}"
|
||||
additionalParams="f={filterSettings -> ep:filterSettingsEncoder()}">
|
||||
Alle anzeigen
|
||||
</f:link.typolink>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{nonBookableInfo}">
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Imaging\IconRegistry;
|
||||
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
|
||||
|
||||
defined('TYPO3') or die();
|
||||
|
||||
call_user_func(function () {
|
||||
if ($GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] !== '') {
|
||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ',';
|
||||
}
|
||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= 'og_image';
|
||||
|
||||
if (TYPO3_MODE === 'BE') {
|
||||
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
|
||||
$iconRegistry->registerIcon(
|
||||
'content-ep_theme-ce',
|
||||
SvgIconProvider::class,
|
||||
['source' => 'EXT:ep_theme/Resources/Public/images/logo.svg']
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user