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:
frommeandClaude Opus 5.5 committed 2026-10-21 14:25:01 +02:00
1 parent 41b9302d9b
commit a598339f67
56 files changed
+10844 -1348

No files matched your search

+15 -2
View File
@@ -4,7 +4,13 @@ docroot: public
php_version: "8.5"
webserver_type: apache-fpm
xdebug_enabled: false
additional_hostnames: []
additional_hostnames:
- sbw-ep13
- snowzone-ep13
- snowbreak-ep13
- ser-ep13
- alvac-ep13
- cllt-ep13
additional_fqdns: []
database:
type: mariadb
@@ -14,6 +20,7 @@ composer_version: "2"
web_environment:
- TYPO3_CONTEXT=Development
nodejs_version: "24"
timezone: Europe/Berlin
corepack_enable: false
# Key features of DDEV's config.yaml:
@@ -292,7 +299,13 @@ corepack_enable: false
# or
# web_environment: []
# or
# additional_hostnames: []
# additional_hostnames:
- sbw-ep13
- snowzone-ep13
- snowbreak-ep13
- ser-ep13
- alvac-ep13
- cllt-ep13
# can have their intended effect. 'override_config' affects only behavior of the
# config.*.yaml file it exists in.
+2
View File
@@ -6,3 +6,5 @@ nbproject
/vendor
/public/*
!/public/.htaccess
/node_modules
/packages/ep_theme/Resources/Public/
+1
View File
@@ -0,0 +1 @@
24
+22
View File
@@ -0,0 +1,22 @@
base: 'https://www.alpinevacation.ch'
baseVariants:
-
base: 'https://alvac-ep13.ddev.site'
condition: 'applicationContext == "Development"'
disableStaticFileCache: false
languages:
-
title: Deutsch
enabled: true
base: /
typo3Language: de
locale: de_DE
iso-639-1: de
websiteTitle: ''
navigationTitle: ''
hreflang: ''
direction: ''
flag: de
languageId: 0
rootPageId: 2458
websiteTitle: ''
+22
View File
@@ -0,0 +1,22 @@
base: 'https://www.cllt-touristik.at'
baseVariants:
-
base: 'https://cllt-ep13.ddev.site'
condition: 'applicationContext == "Development"'
disableStaticFileCache: false
languages:
-
title: Deutsch
enabled: true
base: /
typo3Language: de
locale: de_DE
iso-639-1: de
websiteTitle: ''
navigationTitle: ''
hreflang: ''
direction: ''
flag: de
languageId: 0
rootPageId: 2457
websiteTitle: ''
+295
View File
@@ -0,0 +1,295 @@
base: 'https://www.ep-reisen.de'
baseVariants:
-
base: 'https://ep-reisen-13.ddev.site'
condition: 'applicationContext == "Development"'
-
base: 'https://staging.ep-reisen.de'
condition: 'applicationContext == "Production/Staging"'
disableStaticFileCache: false
errorHandling:
-
errorCode: 404
errorHandler: Page
errorContentSource: 't3://page?uid=608'
languages:
-
title: Deutsch
enabled: true
languageId: 0
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: de
-
title: Englisch
enabled: true
languageId: 1
base: /en/
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-US
direction: ''
fallbackType: strict
fallbacks: ''
flag: gb
rootPageId: 9
routeEnhancers:
NewsDetailPlugin:
type: Extbase
extension: News
plugin: Pi1
limitToPages:
- 1392
routes:
-
routePath: '/{news_title}'
_controller: 'News::detail'
_arguments:
news_title: news
defaultController: 'News::detail'
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
NewsTagPlugin:
type: Extbase
extension: News
plugin: Pi1
limitToPages:
- 1391
routes:
-
routePath: '/{news_tag}'
_controller: 'News::list'
_arguments:
news_tag: overwriteDemand/tags
defaultController: 'News::list'
aspects:
news_tag:
type: PersistedAliasMapper
tableName: tx_news_domain_model_tag
routeFieldName: slug
TeamPlugin:
type: Extbase
extension: EpProducts
plugin: teammembers
limitToPages:
- 1446
routes:
-
routePath: '/{teamer_name}'
_controller: 'Team::show'
_arguments:
teamer_name: member
defaultController: 'Team::show'
aspects:
teamer_name:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_teammember
routeFieldName: path_segment
ProductDetailPlugin:
type: Extbase
extension: EpProducts
plugin: product_detail
routes:
-
routePath: '/detail/{product}'
_controller: 'Product::detail'
_arguments:
product: product
-
routePath: '/detail/{product_uid}/{hotel_uid}'
_controller: 'Product::detail'
_arguments:
product_uid: product
hotel_uid: hotel
-
routePath: '/detail/{product}/{hotel}'
_controller: 'Product::detail'
_arguments:
product: product
hotel: hotel
-
routePath: '/detail/{date_from}/{date_to}'
_controller: 'Product::detail'
_arguments:
date_from: dateFrom
date_to: dateTo
defaultController: 'Product::detail'
aspects:
product:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_product
routeFieldName: path_segment
hotel:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_hotel
routeFieldName: path_segment
product_uid:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_product
routeFieldName: uid
hotel_uid:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_hotel
routeFieldName: uid
date_from:
type: PassthroughMapper
date_to:
type: PassthroughMapper
requirements:
product_uid: \d+
hotel_uid: \d+
date_from: '\d{4}\-\d{2}\-\d{2}'
date_to: '\d{4}\-\d{2}\-\d{2}'
BookingLinkPlugin:
type: Extbase
extension: EpProducts
plugin: product_detail
limitToPages:
- 1846
routes:
-
routePath: '/{product}'
_controller: 'Product::detail'
_arguments:
product: product
defaultController: 'Product::detail'
aspects:
product:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_product
routeFieldName: path_segment
StaticResultsPlugin:
type: Extbase
extension: EpProducts
plugin: staticresult
limitToPages:
- 1838
routes:
-
routePath: '/{filter_settings}'
_controller: 'Search::staticresult'
_arguments:
filter_settings: encodedFilterSettings
defaultController: 'Search::staticresult'
requirements:
filter_settings: '[A-Z\d%\-\|;]+'
aspects:
filter_settings:
type: PassthroughMapper
ContingentsIcalPlugin:
type: Extbase
extension: EpProducts
plugin: ical
limitToPages:
- 9
routes:
-
routePath: '/contingents/{hotel}'
_controller: 'Ical::contingents'
_arguments:
hotel: hotel
defaultController: 'Ical::contingents'
aspects:
hotel:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_hotel
routeFieldName: path_segment
ResellerPlugin:
type: Extbase
extension: EpProducts
plugin: reseller
limitToPages:
- 1483
routes:
-
routePath: '/{reseller_code}'
_controller: 'Reseller::list'
_arguments:
reseller_code: reseller
-
routePath: '/{reseller_code}/xml'
_controller: 'Reseller::xml'
_arguments:
reseller_code: reseller
-
routePath: '/{reseller_code}/csv/{export_type}'
_controller: 'Reseller::csv'
_arguments:
reseller_code: reseller
export_type: type
-
routePath: '/{reseller_code}/copypaste/{product_uid}'
_controller: 'Reseller::copypaste'
_arguments:
reseller_code: reseller
product_uid: product
aspects:
export_type:
type: StaticValueMapper
map:
google: google
facebook: facebook
reseller_code:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_reseller
routeFieldName: code
product_uid:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_product
routeFieldName: uid
TravelinfoPlugin:
type: Extbase
extension: EpProducts
plugin: travelinfo
limitToPages:
- 2736
routes:
-
routePath: '/{travel_info}'
_controller: 'Travelinfo::travelInfo'
_arguments:
travel_info: travelInfo
-
routePath: '/{travel_code}'
_controller: 'Travelinfo::travelCode'
_arguments:
travel_code: travelCode
defaultController: 'Travelinfo::travelInfo'
requirements:
travel_code: '[A-Z]+\d{6}$'
aspects:
travel_info:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_travelinfo
routeFieldName: path_segment
travel_code:
type: PassthroughMapper
PageTypeSuffix:
type: PageType
default: /
index: ''
map:
/: 0
/json: 1701
/html: 1702
.json: 1803
.ical: 1710
sitemap.xml: 1533906435
yoast-snippetpreview.json: 1480321830
/pxa: 7378121
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nDisallow: /ajax/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\n"
websiteTitle: ''
+87
View File
@@ -0,0 +1,87 @@
base: 'https://www.semesterende-skireisen.de'
baseVariants:
-
base: 'https://ser-ep13.ddev.site'
condition: 'applicationContext == "Development"'
errorHandling:
-
errorCode: 404
errorHandler: Page
errorContentSource: 't3://page?uid=2403'
languages:
-
title: Deutsch
enabled: true
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
websiteTitle: ''
navigationTitle: Deutsch
hreflang: de
direction: ''
flag: de
languageId: 0
rootPageId: 2395
routeEnhancers:
ProductDetailPlugin:
type: Extbase
extension: EpProducts
plugin: product_detail
routes:
-
routePath: '/detail/{product}'
_controller: 'Product::detail'
_arguments:
product: product
-
routePath: '/detail/{product_uid}/{hotel_uid}'
_controller: 'Product::detail'
_arguments:
product_uid: product
hotel_uid: hotel
-
routePath: '/detail/{product}/{hotel}'
_controller: 'Product::detail'
_arguments:
product: product
hotel: hotel
-
routePath: '/detail/{date_from}/{date_to}'
_controller: 'Product::detail'
_arguments:
date_from: dateFrom
date_to: dateTo
defaultController: 'Product::detail'
aspects:
product:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_product
routeFieldName: path_segment
hotel:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_hotel
routeFieldName: path_segment
product_uid:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_product
routeFieldName: uid
hotel_uid:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_hotel
routeFieldName: uid
date_from:
type: PassthroughMapper
date_to:
type: PassthroughMapper
requirements:
product_uid: \d+
hotel_uid: \d+
date_from: '\d{4}\-\d{2}\-\d{2}'
date_to: '\d{4}\-\d{2}\-\d{2}'
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\n"
websiteTitle: 'Semsterende Skireisen'
+76
View File
@@ -0,0 +1,76 @@
base: 'https://www.ski-boarderweek.de'
baseVariants:
-
base: 'https://sbw-ep13.ddev.site'
condition: 'applicationContext == "Development"'
disableStaticFileCache: false
errorHandling:
-
errorCode: 404
errorHandler: Page
errorContentSource: 't3://page?uid=608'
languages:
-
title: Deutsch
enabled: true
languageId: 0
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: de
websiteTitle: ''
-
title: Englisch
enabled: true
base: /en/
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
websiteTitle: ''
navigationTitle: ''
hreflang: ''
direction: ''
fallbackType: strict
fallbacks: ''
flag: us
languageId: 1
rootPageId: 24
routeEnhancers:
TeamPlugin:
type: Extbase
extension: EpProducts
plugin: teammembers
limitToPages:
- 1488
routes:
-
routePath: '/{teamer_name}'
_controller: 'Team::show'
_arguments:
teamer_name: member
defaultController: 'Team::show'
aspects:
teamer_name:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_teammember
routeFieldName: path_segment
PageTypeSuffix:
type: PageType
default: /
index: ''
map:
/: 0
/json: 1701
/html: 1702
sitemap.xml: 1533906435
yoast-snippetpreview.json: 1480321830
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\n"
websiteTitle: ''
+59
View File
@@ -0,0 +1,59 @@
base: 'https://www.snowzone.net'
baseVariants:
-
base: 'https://snowzone-ep13.ddev.site'
condition: 'applicationContext == "Development"'
disableStaticFileCache: false
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=608'
languages:
-
title: Deutsch
enabled: true
languageId: '0'
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: de
rootPageId: 25
routeEnhancers:
TeamPlugin:
type: Extbase
extension: EpProducts
plugin: teammembers
limitToPages:
- 1619
routes:
-
routePath: '/{teamer_name}'
_controller: 'Team::show'
_arguments:
teamer_name: member
defaultController: 'Team::show'
aspects:
teamer_name:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_teammember
routeFieldName: path_segment
PageTypeSuffix:
type: PageType
default: /
index: ''
map:
/: 0
/json: 1701
/html: 1702
sitemap.xml: 1533906435
yoast-snippetpreview.json: 1480321830
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\n"
+59
View File
@@ -0,0 +1,59 @@
base: 'https://snowbreak.ep-reisen.de'
baseVariants:
-
base: 'https://snowbreak-ep13.ddev.site'
condition: 'applicationContext == "Development"'
disableStaticFileCache: false
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=608'
languages:
-
title: Deutsch
enabled: true
languageId: '0'
base: /
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: de
rootPageId: 26
routeEnhancers:
TeamPlugin:
type: Extbase
extension: EpProducts
plugin: teammembers
limitToPages:
- 1620
routes:
-
routePath: '/{teamer_name}'
_controller: 'Team::show'
_arguments:
teamer_name: member
defaultController: 'Team::show'
aspects:
teamer_name:
type: PersistedAliasMapper
tableName: tx_epproducts_domain_model_teammember
routeFieldName: path_segment
PageTypeSuffix:
type: PageType
default: /
index: ''
map:
/: 0
/json: 1701
/html: 1702
sitemap.xml: 1533906435
yoast-snippetpreview.json: 1480321830
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\n"
+26
View File
@@ -35,10 +35,36 @@ return [
'loginLogo' => '',
'loginLogoAlt' => '',
],
'ep_products' => [
'bpnConnectApiBaseUrl' => '',
'bpnConnectApiKey' => '',
'bpnConnectApiMaxDuration' => '15',
'bpnConnectApiTimeout' => '5',
'cmsApiKey' => '',
'contentFeedEnabled' => '1',
'contentFeedExcludedPages' => '634',
'contentFeedLanguages' => '0',
'contentFeedNewsDetailPages' => 'ep-reisen:1392',
'contentFeedSites' => 'ep-reisen,ser,ski-boarderweek,ski-wochenenden,snowzone',
'myEpApiBaseUrl' => '',
'myEpApiClientId' => '',
'myEpApiClientSecret' => '',
'myEpApiMaxDuration' => '15',
'myEpApiTimeout' => '5',
'myEpApiUrlAuthorize' => '',
'myEpApiUrlToken' => '',
'myEpStagingUrl' => 'https://my.ep-reisen.net',
'myEpUrl' => 'https://my.ep-reisen.de',
'searchPageUid' => '0',
],
'extensionmanager' => [
'automaticInstallation' => '1',
'offlineMode' => '0',
],
'redirects' => [
'showCheckIntegrityInfoInReports' => '1',
'showCheckIntegrityInfoInReportsSeconds' => '86400',
],
],
'FE' => [
'cacheHash' => [
+9777
View File
File diff suppressed because it is too large. Load diff
+45
View File
@@ -0,0 +1,45 @@
{
"name": "eptheme",
"scripts": {
"dev": "./node_modules/.bin/encore dev --watch",
"build": "NODE_ENV=production ./node_modules/.bin/encore production"
},
"engines": {
"node": ">=20.19.0"
},
"browserslist": [
"defaults"
],
"dependencies": {
"@hotwired/stimulus": "^3.2.1",
"@hotwired/stimulus-webpack-helpers": "^1.0.1",
"@iframe-resizer/parent": "^5.3.2",
"@splidejs/splide": "^2.4.21",
"cooltipz-css": "^1.6.8",
"dayjs": "^1.10.6",
"flatpickr": "^4.6.9",
"glightbox": "^3.0.9",
"htmx.org": "^1.9.12",
"jquery": "^3.6.0",
"leaflet": "^1.7.1",
"normalize.css": "^8.0.1",
"slick-carousel": "^1.8.1",
"sticky-js": "^1.3.0",
"stimulus-use": "^0.52.0"
},
"devDependencies": {
"@babel/preset-env": "^7.16.0",
"@symfony/webpack-encore": "^4.7.0",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.2",
"autoprefixer": "^10.4.8",
"file-loader": "^6.2.0",
"postcss": "^8.4.16",
"postcss-loader": "^8.2.1",
"sass": "^1.53.0",
"sass-loader": "^14.2.1",
"sass-mq": "^7.0.1",
"tailwindcss": "^3.1.8",
"tailwindcss-alt": "^3.0.0"
}
}
@@ -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)
+3 -1
View 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'
],
],
],
];
+3 -3
View File
@@ -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()
);
}
+10
View File
@@ -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}">
-24
View File
@@ -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']
);
}
});
+11 -2
View File
@@ -3,6 +3,7 @@
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector;
use Rector\ValueObject\PhpVersion;
use Ssch\TYPO3Rector\CodeQuality\General\ConvertImplicitVariablesToExplicitGlobalsRector;
use Ssch\TYPO3Rector\CodeQuality\General\ExtEmConfRector;
@@ -10,6 +11,9 @@ use Ssch\TYPO3Rector\CodeQuality\General\RemoveTypo3VersionChecksRector;
use Ssch\TYPO3Rector\Configuration\Typo3Option;
use Ssch\TYPO3Rector\Set\Typo3LevelSetList;
use Ssch\TYPO3Rector\Set\Typo3SetList;
use Ssch\TYPO3Rector\TYPO313\v4\MigratePluginContentElementAndPluginSubtypesRector;
use Ssch\TYPO3Rector\TYPO313\v4\MigratePluginContentElementAndPluginSubtypesSwapArgsRector;
use Ssch\TYPO3Rector\TYPO313\v4\MigratePluginContentElementAndPluginSubtypesTCARector;
return RectorConfig::configure()
->withPaths([
@@ -17,8 +21,12 @@ return RectorConfig::configure()
])
->withSkip([
__DIR__ . '/packages/*/Resources/Private/Assets/*',
// Plugins stay list_type plugins until the TYPO3 14 step, which migrates tt_content
MigratePluginContentElementAndPluginSubtypesRector::class,
MigratePluginContentElementAndPluginSubtypesSwapArgsRector::class,
MigratePluginContentElementAndPluginSubtypesTCARector::class,
])
->withPhpVersion(PhpVersion::PHP_82)
->withPhpVersion(PhpVersion::PHP_85)
->withSets([
Typo3SetList::GENERAL,
Typo3LevelSetList::UP_TO_TYPO3_13,
@@ -27,9 +35,10 @@ return RectorConfig::configure()
->withImportNames(true, true, false, true)
->withRules([
ConvertImplicitVariablesToExplicitGlobalsRector::class,
ExplicitNullableParamTypeRector::class,
])
->withConfiguredRule(ExtEmConfRector::class, [
ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.2.0-8.5.99',
ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.5.0-8.5.99',
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '13.4.0-13.4.99',
ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [],
])
+185
View File
@@ -0,0 +1,185 @@
const postcss = require('postcss')
const plugin = require('tailwindcss/plugin')
module.exports = {
content: [
'./packages/ep_theme/Configuration/RTE/*.yaml',
'./packages/ep_theme/Configuration/TypoScript/**/*.typoscript',
'./packages/ep_theme/Resources/Private/Layouts/**/*.html',
'./packages/ep_theme/Resources/Private/Partials/**/*.html',
'./packages/ep_theme/Resources/Private/Templates/**/*.html',
'./packages/ep_theme/Resources/Private/Assets/js/**/*.{js,vue}',
'./packages/ep_theme/Classes/ViewHelpers/**/*.php',
],
safelist: [
'pt-8', 'pt-16', 'pb-8', 'pb-16',
'bg-red-600',
'bg-header-season-w', 'bg-header-season-s',
'bg-concept-ok', 'bg-concept-ok/70',
'bg-concept-bdg', 'bg-concept-bdg/70',
'bg-concept-skr', 'bg-concept-skr/70',
'bg-concept-evt', 'bg-concept-evt/70',
'bg-concept-fam', 'bg-concept-fam/70',
'bg-concept-grp', 'bg-concept-grp/70',
'bg-concept-prg', 'bg-concept-prg/70',
'bg-concept-ind', 'bg-concept-ind/70',
'bg-concept-wkd', 'bg-concept-wkd/70',
'bg-concept-kt', 'bg-concept-kt/70',
'bg-concept-spz', 'bg-concept-spz/70',
'bg-concept-epe', 'bg-concept-epe/70',
'bg-concept-sfl', 'bg-concept-sfl/70',
'bg-concept-ser', 'bg-concept-ser/70',
'flatpickr-input', 'flatpickr-calendar', 'flatpickr-day', 'flatpickr-day.selected',
'availability-full-to-none', 'availability-full-to-partial', 'availability-none-to-full',
'availability-partial-to-full', 'availability-none-to-partial', 'availability-partial-to-none',
],
theme: {
container: {
center: true,
padding: '1rem',
},
fontFamily: {
'sans': [ 'Lato', 'sans-serif' ],
},
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
},
extend: {
fontSize: {
'xs': '.8rem',
},
colors: {
concept: {
DEFAULT: '#0173A5',
bdg: '#0173A5',
skr: '#0173A5',
evt: '#BA034F',
fam: '#7ca7d5',
grp: '#576D02',
prg: '#0173A5',
ind: '#1684DD',
wkd: '#96BB05',
kt: '#576D02',
spz: '#436a8a',
epe: '#436a8a',
sfl: '#4E4E51',
ser: '#e85243',
ok: '#0173A5',
},
ep: {
primary: '#3d8ccb',
secondary: '#f9c700',
'primary-bg': '#ebf3fa',
'primary-light': '#0070E0',
'primary-medium': '#165883',
'primary-dark': '#18527b',
pink: '#fa1a8c',
},
sbw: {
primary: '#B3820F',
secondary: '#E91C26',
'primary-dark': '#8D7207',
overlay: '#c20000',
},
snz: {
primary: '#82c3c6',
secondary: '#f9c33d',
'primary-dark': '#82c3c6',
},
uch: {
primary: '#FF6A13',
secondary: '#19a3dc',
'primary-dark': '#FF6A13',
overlay: '#FF6A13',
},
ser: {
primary: '#006fb6',
secondary: '#DE2C1B',
'primary-light': '#04A4CC',
},
suz: {
primary: '#f9c33d',
secondary: '#82c3c6',
'primary-dark': '#c7a20c',
},
},
opacity: {
'55': 0.55,
'85': 0.85,
},
backgroundImage: {
'badge-gradient': 'linear-gradient(120deg, #960167 0%, #9e036a 40%, #fa1a8c 100%)',
'brand-gradient': 'linear-gradient(to top right, #009fff, #165883, #18527b)',
},
height: {
'128': '32rem',
},
inset: {
'100': '100%',
'1/2': '50%',
},
zIndex: {
'-10': '-10',
'100': 100,
},
},
},
variants: {
extend: {
backgroundColor: [ 'sbw', 'sbw-hover', 'sbw-group-hover', 'snz', 'snz-hover', 'snz-group-hover', 'uch', 'uch-hover', 'uch-group-hover', 'ser', 'ser-hover', 'ser-group-hover', 'suz', 'suz-hover', 'suz-group-hover' ],
backgroundImage: [ 'ser' ],
textColor: [ 'sbw', 'sbw-hover', 'snz', 'snz-hover', 'uch', 'uch-hover', 'ser', 'ser-hover', 'suz', 'suz-hover', 'suz-group-hover' ],
borderColor: [ 'sbw','snz', 'uch', 'ser', 'suz' ],
display: [ 'reduced' ],
flex: [ 'reduced' ],
flexDirection: [ 'reduced' ],
alignItems: [ 'reduced' ],
padding: [ 'reduced' ],
margin: [ 'reduced' ],
maxWidth: [ 'reduced' ],
},
},
plugins: [
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/forms'),
require('tailwindcss-alt')({
variants: ['sbw', 'snz', 'uch', 'ser', 'suz'],
}),
plugin(function ({addVariant, e}) {
addVariant('hover-hover', ({ container, separator }) => {
const hoverHover = postcss.atRule({ name: 'media', params: '(hover: hover)' })
hoverHover.append(container.nodes)
container.append(hoverHover)
hoverHover.walkRules(rule => {
rule.selector = `.${e(`hover-hover${separator}${rule.selector.slice(1)}`)}`
})
})
addVariant('hover-none', ({ container, separator }) => {
const hoverNone = postcss.atRule({ name: 'media', params: '(hover: none)' })
hoverNone.append(container.nodes)
container.append(hoverNone)
hoverNone.walkRules(rule => {
rule.selector = `.${e(`hover-none${separator}${rule.selector.slice(1)}`)}`
})
})
addVariant('first-type', ({modifySelectors, separator}) => {
modifySelectors(({className}) => {
return `.${e(`first-type${separator}${className}`)}:first-of-type`
})
})
addVariant('last-type', ({modifySelectors, separator}) => {
modifySelectors(({className}) => {
return `.${e(`last-type${separator}${className}`)}:last-of-type`
})
})
addVariant('reduced', ({modifySelectors, separator}) => {
modifySelectors(({className}) => {
return `.reduced .${e(`reduced${separator}${className}`)}`
})
})
}),
],
}
+79
View File
@@ -0,0 +1,79 @@
const Encore = require('@symfony/webpack-encore');
const crypto = require('crypto');
const path = require('path');
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
// TYPO3 publishes Resources/Public of a Composer package as /_assets/<md5 of its vendor path>,
// e.g. md5('/vendor/ep/ep-theme/'). The hash depends on the package name only, so it is the
// same locally and in production.
const publicPath = '/_assets/' + crypto.createHash('md5').update('/vendor/ep/ep-theme/').digest('hex') + '/';
// Create webpack config for ext:ep_theme
Encore
.setOutputPath('./packages/ep_theme/Resources/Public/')
.setPublicPath(publicPath)
// manifest.json keys without a prefix ("js/main.js"); output and public path differ
.setManifestKeyPrefix('')
.addEntry('main', './packages/ep_theme/Resources/Private/Assets/js/main.js')
.addStyleEntry('rte', './packages/ep_theme/Resources/Private/Assets/scss/rte.scss')
.splitEntryChunks()
// There is only one JS entry, so a shared runtime chunk buys nothing and costs a separate
// 1.6KB request that every other bundle hard-depends on. Inlining it into main.js removes
// both, and stops the `rte` style entry from dragging a JS file in behind it.
.disableSingleRuntimeChunk()
.enableSassLoader(options => {
// Opt into the modern Sass JS API (sass-loader defaults to the legacy one,
// which Dart Sass 2.0 removes). Encore still passes `outputStyle`, which
// the modern API ignores in favour of `style`.
options.api = 'modern'
delete options.sassOptions.outputStyle
options.sassOptions.style = 'expanded'
// sass-loader's webpack importer declines `.css` requests, so plain CSS
// pulled in with meta.load-css() has to be resolvable by Dart Sass itself.
options.sassOptions.loadPaths = [path.join(__dirname, 'node_modules')]
})
.enableVersioning(Encore.isProduction())
.enableSourceMaps(!Encore.isProduction())
.cleanupOutputBeforeBuild()
.enablePostCssLoader(options => {
options.postcssOptions = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
}
})
.copyFiles([
{ from: './packages/ep_theme/Resources/Private/Assets/images', to: 'images/[name].[ext]' },
{ from: './packages/ep_theme/Resources/Private/Assets/images/icons', to: 'images/icons/[name].[ext]' },
])
// The content hash is what lets .htaccess serve these as `immutable` for a year: a new
// build is a new URL, so a browser never has to revalidate one. It also replaces TYPO3's
// `?<mtime>` query buster, which changed on every deploy even when the bytes did not.
// `rte` stays unhashed - Configuration/RTE/*.yaml reference rte.css by literal path.
.configureFilenames({
js: Encore.isProduction() ? 'js/[name].[contenthash:8].js' : 'js/[name].js',
css: (pathData) => Encore.isProduction() && pathData.chunk.name !== 'rte'
? 'css/[name].[contenthash:8].css'
: 'css/[name].css',
})
.configureImageRule({
filename: 'images/[name].[contenthash:8][ext]',
})
.configureFontRule({
filename: 'fonts/[name].[contenthash:8][ext]',
})
.configureBabelPresetEnv((config) => {
config.shippedProposals = true
});
const EpThemeConfig = Encore.getWebpackConfig();
EpThemeConfig.name = 'EpThemeConfig';
EpThemeConfig.output.chunkFilename = 'js/[name].[contenthash:8].js';
module.exports = EpThemeConfig;