1, 'estimateTodo' => 2, 'waiting' => 9, 'recette' => 12, 'production' => 13, 'archived' => 15, 'waitingValidation' => 17, 'takenInAccount' => 18, ]; } /** * Enum labels * * @return array */ protected static function labels(): array { return [ 'new' => trans('Nouveau'), 'estimateTodo' => trans('Devis à faire'), 'waiting' => trans('En attente de réponse'), 'waitingValidation' => trans('En attente de validation'), 'recette' => trans('En recettage'), 'production' => trans('En production'), 'archived' => trans('Archivé'), 'takenInAccount' => trans('Pris en compte'), ]; } /** * Enum classes * * @return array */ protected static function classes(): array { return [ 'new' => 'text-danger', 'estimateTodo' => 'text-info', 'waiting' => 'text-white bg-danger', 'waitingValidation' => 'text-warning bg-danger', 'recette' => 'text-primary', 'production' => 'text-success', 'archived' => 'text-secondary', 'takenInAccount' => 'text-info', ]; } /** * @param string $attribute * @return integer|string */ public function __get(string $attribute) { if ($attribute === 'class') { return $this->classes()[$this->getDefinition()]; } return parent::__get($attribute); } }