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.

27 lines
835B

  1. <?php
  2. namespace domain\Order\OrderStatusHistory;
  3. use domain\_\AbstractSolver;
  4. use domain\Order\OrderStatus\OrderStatus;
  5. class OrderStatusHistorySolver extends AbstractSolver
  6. {
  7. public function getOrderStatusHistoryLabel(OrderStatusHistory $orderStatusHistory): string
  8. {
  9. if($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_ORDERED) {
  10. return 'Validée';
  11. }
  12. elseif($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_UPDATED) {
  13. return 'Modifiée';
  14. }
  15. elseif($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_CANCELED) {
  16. return 'Annulée';
  17. }
  18. elseif($orderStatusHistory->getOrderStatusAlias() == OrderStatus::ALIAS_DELETED) {
  19. return 'Supprimée';
  20. }
  21. return '';
  22. }
  23. }