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 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;