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.

OrderStatusHistoryFactory.php 999B

3 vuotta sitten
2 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
2 vuotta sitten
3 vuotta sitten
3 vuotta sitten
123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Order;
  3. use Lc\CaracoleBundle\Container\Order\OrderStatusHistoryContainer;
  4. use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
  5. use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface;
  6. use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryModel;
  7. use Lc\CaracoleBundle\Model\Order\OrderStatusInterface;
  8. use Lc\SovBundle\Factory\AbstractFactory;
  9. class OrderStatusHistoryFactory extends AbstractFactory
  10. {
  11. public function create(OrderShopInterface $orderShop, OrderStatusInterface $status, string $origin = OrderStatusHistoryModel::ORIGIN_USER): OrderStatusHistoryInterface
  12. {
  13. $class = OrderStatusHistoryContainer::getEntityFqcn();
  14. $orderStatusHistory = new $class;
  15. $orderStatusHistory->setOrderShop($orderShop);
  16. $orderStatusHistory->setOrderStatus($status);
  17. $orderStatusHistory->setOrigin($origin);
  18. $orderStatusHistory->setCreatedAt(new \DateTime());
  19. return $orderStatusHistory;
  20. }
  21. }