*/ public static array $includedServicesMapping = [ 7 => 'Skipass', 8 => 'Sonstige', 71 => 'Verpflegung', 74 => 'Unterkünfte', 85 => 'Übernachtung', 86 => 'Programm', 88 => 'Personal', 90 => 'Transport', ]; #[Groups(['api:single'])] public ?int $id = null; #[Groups(['api:single'])] public ?string $label = null; #[Groups(['api:single'])] public ?array $selections = null; /** * Retrieves only the mutable selections from the group. * * Filters the selections array to return only items that are marked * as mutable for user interface management. * * @return array The mutable selections array */ public function getMutableSelections(): array { return array_filter($this->selections, function (CrmSelection $selection) { return $selection->mutable; }); } /** * Determines if the selection group should be visible. * * A group is considered visible if it contains at least one * mutable selection for user interaction. * * @return bool True if the group has mutable selections, false otherwise */ #[Groups(['api:single'])] public function isVisible(): bool { return 0 < count($this->getMutableSelections()); } }