'erweitertes Führungszeugnis', static::PS => 'Präventionsschulung Basis Plus', static::MOREPS => 'Präventionsschulung (Auffrischung)', static::VK => 'Verhaltenskodex', }; } public function tooltip(bool $value): string { return $this->text() . ' ' . ($value ? 'vorhanden' : 'nicht vorhanden'); } public function letter(): string { return match ($this) { static::EFZ => 'F', static::PS => 'P', static::MOREPS => 'A', static::VK => 'V', }; } /** * @param array $preventions * @return Collection */ public static function items(array $preventions): Collection { return collect(static::cases())->map(fn ($case) => [ 'letter' => $case->letter(), 'value' => !in_array($case, $preventions), 'tooltip' => $case->tooltip(!in_array($case, $preventions)), ]); } }