45 lines
1,023 B
PHP
45 lines
1,023 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Kwaadpepper\Enum\BaseEnum;
|
|
|
|
/**
|
|
* @method static self Ble()
|
|
* @method static self Colza()
|
|
* @method static self Mais()
|
|
* @method static self Orge()
|
|
* @method static self Tournesol_Oleique()
|
|
* @method static self Tournesol_Standard()
|
|
*/
|
|
final class ProduitEnum extends BaseEnum
|
|
{
|
|
protected static function values(): array
|
|
{
|
|
return [
|
|
'Ble' => 1,
|
|
'Colza' => 2,
|
|
'Mais' => 3,
|
|
'Orge' => 4,
|
|
'Tournesol_Oleique' => 5,
|
|
'Tournesol_Standard' => 6,
|
|
];
|
|
}
|
|
|
|
protected static function labels(): array
|
|
{
|
|
return [
|
|
'Ble' => __('Ble'),
|
|
'Colza' => __('Colza'),
|
|
'Mais' => __('Maïs'),
|
|
'Orge' => __('Orge'),
|
|
'Tournesol_Oleique' => __('Tournesol Oléique'),
|
|
'Tournesol_Standard' => __('Tournesol Standard'),
|
|
];
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
return (string) $this->label;
|
|
}
|
|
}
|