orderStatusDefinition = $this->loadService(OrderStatusDefinition::class); } public function getDefaultOptionsSearch(): array { return []; } public function getOrderStatusByAlias(string $alias): OrderStatus { $orderStatusArray = $this->orderStatusDefinition->getOrderStatusList(); if(isset($orderStatusArray[$alias])) { return OrderStatusBuilder::getInstance()->instanciateOrderStatus( $alias, $orderStatusArray[$alias]['label'] ); } else { throw new ErrorException('Statut de commande introuvable : '.$alias); } } }