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

42 lines
1.1 KiB
PHP

<?php
namespace App\Enums\Ingredients;
enum IngredientFunctionEnum : int {
case dye = 1;
case antiOxidant = 2;
case starch = 3;
case curator = 4;
case freezingAgent = 5;
case sweetener = 6;
case stabilizer = 7;
case emulsifier = 8;
case thickener = 9;
case sugar = 10;
case salt = 11;
case fiber = 12;
case protein = 13;
public function label(): string {
return static::getLabel($this);
}
public static function getLabel(self $value): string {
return match ($value) {
self::dye => __('Colorant'),
self::antiOxidant => __('Anti-oxidant'),
self::starch => __('Amidon'),
self::curator => __('Conservateur'),
self::freezingAgent => __('Gelifiant'),
self::sweetener => __('Edulcorant'),
self::stabilizer => __('Stabilisateur'),
self::emulsifier => __('Emulsifiant'),
self::thickener => __('Epaississant'),
self::sugar => __('Sucre'),
self::salt => __('Sel'),
self::fiber => __('Fibre'),
self::protein => __('Protéine'),
};
}
}