You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace domain\Order\OrderStatus;
-
- use domain\_\AbstractSolver;
-
- class OrderStatusSolver extends AbstractSolver
- {
- protected OrderStatusDefinition $orderStatusDefinition;
-
- public function loadDependencies(): void
- {
- $this->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 '?';
- }
- }
- }
|