wip: continue implemntation
This commit is contained in:
@@ -13,9 +13,15 @@ class Travel
|
||||
public ?float $priceFrom = null;
|
||||
public array $selectionGroups = [];
|
||||
public array $additionalServices = [];
|
||||
public bool $additionalServicesMutable = true;
|
||||
public array $transportationServices = [];
|
||||
public bool $transportationServicesMutable = true;
|
||||
public array $pickups = [];
|
||||
public bool $pickupsMutable = true;
|
||||
public array $rooms = [];
|
||||
public bool $roomsMutable = true;
|
||||
public bool $participantDataMutable = true;
|
||||
public bool $participantCountMutable = true;
|
||||
|
||||
public function getAdditionalServicesByGroup(mixed $group, bool $availableOnly = true): array
|
||||
{
|
||||
@@ -34,4 +40,17 @@ class Travel
|
||||
&& (false === $availableOnly || $service->available > 0);
|
||||
});
|
||||
}
|
||||
|
||||
public function getIncludedServices(): array
|
||||
{
|
||||
$services = [];
|
||||
|
||||
foreach (CrmSelectionGroup::$includedServicesMapping as $id => $label) {
|
||||
if (isset($this->selectionGroups[$id])) {
|
||||
$services[] = $this->selectionGroups[$id];
|
||||
}
|
||||
}
|
||||
|
||||
return $services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user