Improve route enhancing
This commit is contained in:
@@ -125,11 +125,15 @@ routeEnhancers:
|
|||||||
type: PersistedAliasMapper
|
type: PersistedAliasMapper
|
||||||
tableName: tx_epproducts_domain_model_hotel
|
tableName: tx_epproducts_domain_model_hotel
|
||||||
routeFieldName: uid
|
routeFieldName: uid
|
||||||
|
date_from:
|
||||||
|
type: PassthroughMapper
|
||||||
|
date_to:
|
||||||
|
type: PassthroughMapper
|
||||||
requirements:
|
requirements:
|
||||||
product_uid: '\d'
|
product_uid: '\d'
|
||||||
hotel_uid: '\d'
|
hotel_uid: '\d'
|
||||||
date_from: '\d{4}-\d{2}-\d{2}'
|
date_from: '\d{4}\-\d{2}\-\d{2}'
|
||||||
date_to: '\d{4}-\d{2}-\d{2}'
|
date_to: '\d{4}\-\d{2}\-\d{2}'
|
||||||
BookingLinkPlugin:
|
BookingLinkPlugin:
|
||||||
type: Extbase
|
type: Extbase
|
||||||
extension: EpProducts
|
extension: EpProducts
|
||||||
@@ -163,6 +167,9 @@ routeEnhancers:
|
|||||||
defaultController: 'Search::searchresult'
|
defaultController: 'Search::searchresult'
|
||||||
requirements:
|
requirements:
|
||||||
filter_settings: '[A-Z\d%\-]+'
|
filter_settings: '[A-Z\d%\-]+'
|
||||||
|
aspects:
|
||||||
|
filter_settings:
|
||||||
|
type: PassthroughMapper
|
||||||
StaticResultsPlugin:
|
StaticResultsPlugin:
|
||||||
type: Extbase
|
type: Extbase
|
||||||
extension: EpProducts
|
extension: EpProducts
|
||||||
@@ -178,6 +185,9 @@ routeEnhancers:
|
|||||||
defaultController: 'Search::staticresult'
|
defaultController: 'Search::staticresult'
|
||||||
requirements:
|
requirements:
|
||||||
filter_settings: '[A-Z\d%\-]+'
|
filter_settings: '[A-Z\d%\-]+'
|
||||||
|
aspects:
|
||||||
|
filter_settings:
|
||||||
|
type: PassthroughMapper
|
||||||
ContingentsIcalPlugin:
|
ContingentsIcalPlugin:
|
||||||
type: Extbase
|
type: Extbase
|
||||||
extension: EpProducts
|
extension: EpProducts
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpProducts\Routing\Aspect;
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
*
|
||||||
|
* Copyright notice
|
||||||
|
*
|
||||||
|
* (c) 2020 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 TYPO3\CMS\Core\Routing\Aspect\StaticMappableAspectInterface;
|
||||||
|
|
||||||
|
class PassthroughMapper implements StaticMappableAspectInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function generate(string $value): ?string
|
||||||
|
{
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function resolve(string $value): ?string
|
||||||
|
{
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -403,15 +403,15 @@ $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'gclid'
|
|||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'ref';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'ref';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'pa';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'pa';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_searchresult[searchParams]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_searchresult[searchParams]';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_searchresult[filterSettings]';
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_product_detail[dateFrom]';
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_product_detail[dateTo]';
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_reseller[reseller]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_reseller[reseller]';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[months]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[months]';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[month]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[month]';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[year]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[year]';
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[hotel]';
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_epproducts_ajax[hotel]';
|
||||||
|
|
||||||
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['routing']['aspects']['PassthroughMapper'] =
|
||||||
|
\EP\EpProducts\Routing\Aspect\PassthroughMapper::class;
|
||||||
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [
|
$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [
|
||||||
\TYPO3\CMS\Core\Log\LogLevel::INFO => [
|
\TYPO3\CMS\Core\Log\LogLevel::INFO => [
|
||||||
TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [
|
TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [
|
||||||
@@ -420,4 +420,5 @@ $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConf
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['teamSlug'] = \EP\EpProducts\Updates\TeamSlugUpdater::class;
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['teamSlug'] =
|
||||||
|
\EP\EpProducts\Updates\TeamSlugUpdater::class;
|
||||||
|
|||||||
Reference in New Issue
Block a user