ldc-boutique-cnc/app/Enums/OrderUnit.php

37 lines
655 B
PHP
Raw Permalink Normal View History

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