fix: use correct source for included board services on travel info pages

This commit is contained in:
Björn Fromme
2025-11-10 13:01:29 +01:00
parent f7f8a47bd5
commit 0e7ecd7a97
@@ -13,6 +13,8 @@ use TYPO3\CMS\Frontend\Controller\ErrorController;
class TravelinfoController extends ActionController
{
private const SELECTION_ID_BOARD = 71;
/**
* @var ApiClient
*/
@@ -74,10 +76,9 @@ class TravelinfoController extends ActionController
return 'KUR' === $service['subType'];
});
// extract board services from additional services
$board = array_filter($travelData['additionalServices'] ?? [], function ($service) {
return 'VPF' === $service['subType'];
});
// extract board services from included services
$includedServicesBoard = $travelData['selectionGroups'][self::SELECTION_ID_BOARD] ?? [];
$board = $includedServicesBoard['selections'] ?? [];
// extract bus departure time if applicable
$departureDayTime = null;