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

38 lines
1.2 KiB
PHP

<?php
namespace App\Enums\Products;
enum ProductClaimEnum : int {
case productOfYear = 1;
case omega3 = 2;
case withoutOgm = 3;
case withoutGluten = 4;
case withoutAdditives = 5;
case christmas = 6;
case vegetarian = 7;
case lightweight = 8;
case halal = 9;
case highVitamins = 10;
case others = 11;
public function label(): string {
return static::getLabel($this);
}
public static function getLabel(self $value): string {
return match ($value) {
self::productOfYear => __('Produit de l\'année'),
self::omega3 => __('Bleu Blanc Coeur, source d\'Omega 3'),
self::withoutOgm => __('Sans OGM'),
self::withoutGluten => __('Sans gluten'),
self::withoutAdditives => __('Sans additif, sans colorant, sans conservateur, 100% simple, sans polyphosphate, sans sel nitrité'),
self::withoutAntibiotics => __('Sans Antibiotique'),
self::vegetarian => __('Vegan'),
self::lightweight => __('Allégé'),
self::halal => __('Halal, Casher'),
self::highVitamins => __('Riche en protéines, fibres, calcium… '),
self::others => __('Autres'),
};
}
}