orderStatusDefinition = $this->loadService(OrderStatusDefinition::class); } public function getLabel(string $orderStatusAlias = null): string { $orderStatusArray = $this->orderStatusDefinition->getOrderStatusList(); if(isset($orderStatusArray[$orderStatusAlias])) { return $orderStatusArray[$orderStatusAlias]['label']; } else { return '?'; } } }