feat: dedicated logos per country for accommodation bookings
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enum\Groups;
|
||||
|
||||
enum AccommodationCountry: string
|
||||
{
|
||||
case Germany = 'DE';
|
||||
case Austria = 'AT';
|
||||
case Switzerland = 'CH';
|
||||
case Italy = 'IT';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return 'enum.accommodation_country.'.$this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logo of the legal entity operating this country's accommodations, shown in the
|
||||
* header of the public booking and offer pages. Null falls back to the logo of the
|
||||
* request host — Germany has no dedicated entity.
|
||||
*/
|
||||
public function logo(): ?string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Austria => 'logo_cllt.svg',
|
||||
self::Switzerland => 'logo_alpinevacation.svg',
|
||||
self::Italy => 'logo_ep.svg',
|
||||
self::Germany => null,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user