feat: prefer discounted transportation services

addresses #869axbjbz
This commit is contained in:
Björn Fromme committed 2026-03-16 11:59:11 +01:00
1 parent d0c8302d21
commit af163d597e
4 files changed
+261 -3

No files matched your search

+6 -2
View File
@@ -48,7 +48,7 @@ class Travel
/**
* Travel booking status from BusProNet API.
* Possible values: 'Frei', 'Anfrage', 'Buchungsstop'
* Possible values: 'Frei', 'Anfrage', 'Buchungsstop'.
*/
#[Groups(['api:single'])]
public ?string $status = null;
@@ -153,8 +153,12 @@ class Travel
* Filters transportation services based on travel direction and optionally
* by availability. Services are sorted by subtype.
*
* Note: PKW/CAR filtering based on booking context is NOT applied here.
* That filtering happens dynamically in ParticipantFieldOptionsProvider using
* per-booking availability calculations from ServiceAvailabilityCalculator.
*
* @param string $direction The travel direction to filter by
* @param bool $filterAvailable Whether to include only available services
* @param bool $filterAvailable Whether to include only available services (API availability)
*
* @return array<int, Service> The filtered and sorted transportation services
*/