ldc-boutique-cnc/app/Enums/SellUnit.php
2022-09-03 16:56:16 +02:00

50 lines
854 B
PHP

<?php
namespace App\Enums;
use Kwaadpepper\Enum\BaseEnum;
/**
* @method static self pce()
* @method static self kgm()
* @method static self colis()
*/
final class SellUnit extends BaseEnum
{
/**
* Enum values
*
* @return array
*/
protected static function values(): array
{
return [
'pce' => 'PCE',
'kgm' => 'KGM',
'colis' => 'COLIS',
];
}
/**
* Enum labels
*
* @return array
*/
protected static function labels(): array
{
return [
'pce' => __('Pièce'),
'kgm' => __('Kg'),
'colis' => __('Colis'),
];
}
/**
* Output the value as a string
* @return string
*/
public function __toString(): string
{
return (string)$this->label;
}
}