|
123456789101112131415161718192021222324252627 |
- <?php
-
- namespace domain\Order\OrderStatusHistory;
-
- use domain\_\AbstractSolver;
- use domain\Order\OrderStatus\OrderStatus;
-
- class OrderStatusHistorySolver extends AbstractSolver
- {
- public function getOrderStatusHistoryLabel(OrderStatusHistory $orderStatusHistory): string
- {
- if($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_ORDERED) {
- return 'Validée';
- }
- elseif($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_UPDATED) {
- return 'Modifiée';
- }
- elseif($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_CANCELED) {
- return 'Annulée';
- }
- elseif($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_DELETED) {
- return 'Supprimée';
- }
-
- return '';
- }
- }
|