56 lines
1.2 KiB
PHP
56 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Enums\Products;
|
|
|
|
use Kwaadpepper\Enum\BaseEnum;
|
|
|
|
/**
|
|
* @method static self bio()
|
|
* @method static self lr()
|
|
* @method static self bea_a()
|
|
* @method static self bea_b()
|
|
* @method static self nutriscore_a()
|
|
* @method static self nutriscore_b()
|
|
* @method static self planetscore()
|
|
* @method static self igp()
|
|
*/
|
|
final class ProductLabelEnum extends BaseEnum
|
|
{
|
|
/**
|
|
* Enum values
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function values(): array
|
|
{
|
|
return [
|
|
'bio' => 0,
|
|
'lr' => 1,
|
|
'bea_a' => 2,
|
|
'bea_b' => 3,
|
|
'nutriscore_a' => 4,
|
|
'nutriscore_b' => 5,
|
|
'planetscore' => 6,
|
|
'igp' => 7
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Enum labels
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function labels(): array
|
|
{
|
|
return [
|
|
'bio' => trans('Bio'),
|
|
'lr' => trans('Label Rouge'),
|
|
'bea_a' => trans('Bea A'),
|
|
'bea_b' => trans('Bea B'),
|
|
'nutriscore_a' => trans('Nutriscore A'),
|
|
'nutriscore_b' => trans('Nutriscore B'),
|
|
'planetscore' => trans('PlanetScore'),
|
|
'igp' => trans('IGP')
|
|
];
|
|
}
|
|
}
|