ldc-startcoq/app/Enums/Promotions/PromotionTargetEnum.php
Alexis Gousseau 95c9dd10d5 add enums
2023-02-23 10:26:11 +01:00

26 lines
590 B
PHP

<?php
namespace App\Enums\Promotions;
enum PromotionTargetEnum : int {
case women = 1;
case man = 2;
case junior = 3;
case senior = 4;
case allTargets = 5;
public function label(): string {
return static::getLabel($this);
}
public static function getLabel(self $value): string {
return match ($value) {
self::women => __('Femme'),
self::man => __('Homme'),
self::junior => __('Junior'),
self::senior => __('Senior'),
self::allTargets => __('Toutes cibles'),
};
}
}