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

36 lines
1 KiB
PHP

<?php
namespace App\Enums\Packaging;
enum PackagingBenefitEnum : int {
case resistance = 1;
case recyclability = 2;
case presentation = 3;
case openingClosing = 4;
case toaster = 5;
case traditionalOven = 6;
case microwaveOven = 7;
case communication = 8;
case barbecue = 9;
case others = 10;
public function label(): string {
return static::getLabel($this);
}
public static function getLabel(self $value): string {
return match ($value) {
self::resistance => __('Résistance'),
self::recyclability => __('Recyclabilité'),
self::presentation => __('Présentation'),
self::openingClosing => __('Ouverture/Fermeture'),
self::toaster => __('Grille pain'),
self::traditionalOven => __('Four Traditionnel'),
self::microwaveOven => __('Four micro-onde'),
self::communication => __('Communication'),
self::barbecue => __('Barbecue'),
self::others => __('Autres')
};
}
}