fix: use correct source for included board services on travel info pages
This commit is contained in:
@@ -13,6 +13,8 @@ use TYPO3\CMS\Frontend\Controller\ErrorController;
|
|||||||
|
|
||||||
class TravelinfoController extends ActionController
|
class TravelinfoController extends ActionController
|
||||||
{
|
{
|
||||||
|
private const SELECTION_ID_BOARD = 71;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ApiClient
|
* @var ApiClient
|
||||||
*/
|
*/
|
||||||
@@ -74,10 +76,9 @@ class TravelinfoController extends ActionController
|
|||||||
return 'KUR' === $service['subType'];
|
return 'KUR' === $service['subType'];
|
||||||
});
|
});
|
||||||
|
|
||||||
// extract board services from additional services
|
// extract board services from included services
|
||||||
$board = array_filter($travelData['additionalServices'] ?? [], function ($service) {
|
$includedServicesBoard = $travelData['selectionGroups'][self::SELECTION_ID_BOARD] ?? [];
|
||||||
return 'VPF' === $service['subType'];
|
$board = $includedServicesBoard['selections'] ?? [];
|
||||||
});
|
|
||||||
|
|
||||||
// extract bus departure time if applicable
|
// extract bus departure time if applicable
|
||||||
$departureDayTime = null;
|
$departureDayTime = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user