*/ public const SIMPLE_NAVIGATION = [ Dashboard::class, OccupancyCalendar::class, BookingResource::class, GuestResource::class, BlockedPeriodResource::class, PricesAndOffers::class, ChannelResource::class, ]; public function getLabel(): string { return match ($this) { self::Simple => 'Einfache Ansicht', self::Expert => 'Expertenansicht', }; } public function getDescription(): string { return match ($this) { self::Simple => 'Das Tägliche: Start mit allem, was zu tun ist, Kalender, Vorgänge, Gäste, Sperrzeiten, Preise', self::Expert => 'Alle Einstellungen: Preise, Angebote, Kalenderabgleich (iCal), Webseite, System', }; } /** * Whether a resource or page appears in the menu in this mode. * * @param class-string $class */ public function shows(string $class): bool { return $this === self::Expert || in_array($class, self::SIMPLE_NAVIGATION, true); } /** * Label of the user menu entry that switches to this mode. */ public function switchLabel(): string { return match ($this) { self::Simple => 'Zur einfachen Ansicht wechseln', self::Expert => 'Zur Expertenansicht wechseln', }; } public function other(): self { return $this === self::Simple ? self::Expert : self::Simple; } }