chore: remove obsolete controller action
This commit is contained in:
@@ -260,11 +260,6 @@ routeEnhancers:
|
|||||||
_arguments:
|
_arguments:
|
||||||
travel_info: travelinfo
|
travel_info: travelinfo
|
||||||
travel_date: travelDate
|
travel_date: travelDate
|
||||||
-
|
|
||||||
routePath: '/{buspro_id}'
|
|
||||||
_controller: 'Travelinfo::myep'
|
|
||||||
_arguments:
|
|
||||||
buspro_id: busProId
|
|
||||||
-
|
-
|
||||||
routePath: '/{travel_code}'
|
routePath: '/{travel_code}'
|
||||||
_controller: 'Travelinfo::travelCode'
|
_controller: 'Travelinfo::travelCode'
|
||||||
@@ -278,13 +273,10 @@ routeEnhancers:
|
|||||||
routeFieldName: path_segment
|
routeFieldName: path_segment
|
||||||
travel_date:
|
travel_date:
|
||||||
type: PassthroughMapper
|
type: PassthroughMapper
|
||||||
buspro_id:
|
|
||||||
type: PassthroughMapper
|
|
||||||
travel_code:
|
travel_code:
|
||||||
type: PassthroughMapper
|
type: PassthroughMapper
|
||||||
requirements:
|
requirements:
|
||||||
travel_date: '\d{4}\-\d{2}\-\d{2}|\d{2}\d{2}\d{4}'
|
travel_date: '\d{4}\-\d{2}\-\d{2}|\d{2}\d{2}\d{4}'
|
||||||
buspro_id: '\d+'
|
|
||||||
PageTypeSuffix:
|
PageTypeSuffix:
|
||||||
type: PageType
|
type: PageType
|
||||||
default: /
|
default: /
|
||||||
|
|||||||
@@ -72,34 +72,7 @@ class TravelinfoController extends ActionController
|
|||||||
$this->view->assign('date', $date);
|
$this->view->assign('date', $date);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function myepAction(int $busProId)
|
public function indexAction(Travelinfo $travelinfo, string $travelDate)
|
||||||
{
|
|
||||||
/** @var Date $date */
|
|
||||||
$date = $this->dateRepository->findOneByBusProId($busProId);
|
|
||||||
|
|
||||||
if (null === $date) {
|
|
||||||
$response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
|
|
||||||
$GLOBALS['TYPO3_REQUEST'],
|
|
||||||
'Reisedaten nicht gefunden'
|
|
||||||
);
|
|
||||||
throw new ImmediateResponseException($response, 1731071856);
|
|
||||||
}
|
|
||||||
|
|
||||||
$travelinfo = $this->travelInfoRepository->findOneByProduct($date->getProduct());
|
|
||||||
|
|
||||||
if (null === $travelinfo) {
|
|
||||||
$response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
|
|
||||||
$GLOBALS['TYPO3_REQUEST'],
|
|
||||||
'Reiseinformationen nicht gefunden'
|
|
||||||
);
|
|
||||||
throw new ImmediateResponseException($response, 1731071856);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->view->assign('travelinfo', $travelinfo);
|
|
||||||
$this->view->assign('date', $date);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function indexAction(Travelinfo $travelinfo, string $travelDate = null)
|
|
||||||
{
|
{
|
||||||
$product = $travelinfo->getProduct();
|
$product = $travelinfo->getProduct();
|
||||||
|
|
||||||
@@ -107,12 +80,8 @@ class TravelinfoController extends ActionController
|
|||||||
$travelDate = (\DateTimeImmutable::createFromFormat('dmY', $travelDate))->format('Y-m-d');
|
$travelDate = (\DateTimeImmutable::createFromFormat('dmY', $travelDate))->format('Y-m-d');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null === $travelDate) {
|
/** @var Date $date */
|
||||||
$date = null;
|
$date = $this->dateRepository->findForProductAndDate($product, $travelDate)->getFirst();
|
||||||
} else {
|
|
||||||
/** @var Date $date */
|
|
||||||
$date = $this->dateRepository->findForProductAndDate($product, $travelDate)->getFirst();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->view->assign('travelinfo', $travelinfo);
|
$this->view->assign('travelinfo', $travelinfo);
|
||||||
$this->view->assign('date', $date);
|
$this->view->assign('date', $date);
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ $boot = function () {
|
|||||||
'EP.ep_products',
|
'EP.ep_products',
|
||||||
'travelinfo',
|
'travelinfo',
|
||||||
[
|
[
|
||||||
'Travelinfo' => 'index,myep,travelCode',
|
'Travelinfo' => 'index,travelCode',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
|
|
||||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
|
||||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
|
|
||||||
|
|
||||||
<f:layout name="Default"/>
|
|
||||||
|
|
||||||
<f:section name="Main">
|
|
||||||
<f:render partial="Travelinfo" section="Main" arguments="{_all}"/>
|
|
||||||
</f:section>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
Reference in New Issue
Block a user