|
123456789101112131415161718192021222324252627 |
- <?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 '?';
- }
- }
- }
|