28 lines
707 B
PHP
28 lines
707 B
PHP
<?php
|
|
|
|
namespace App\Enums\Products;
|
|
|
|
enum ProductCertificationEnum : int {
|
|
case bioAB = 1;
|
|
case labelRouge = 2;
|
|
case certifiedCQ = 3;
|
|
case standard = 4;
|
|
case freeRange = 5;
|
|
case others = 6;
|
|
|
|
public function label(): string {
|
|
return static::getLabel($this);
|
|
}
|
|
|
|
public static function getLabel(self $value): string {
|
|
return match ($value) {
|
|
self::bioAB => __('Bio AB ou Européen'),
|
|
self::labelRouge => __('Label Rouge'),
|
|
self::certifiedCQ => __('Certifié CQ'),
|
|
self::standard => __('Standard'),
|
|
self::freeRange => __('Free Range'),
|
|
self::others => __('Autres'),
|
|
};
|
|
}
|
|
|
|
}
|