|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Order;
-
- use App\Entity\Order\OrderStatusHistory;
- use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
- use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface;
- use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryModel;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class OrderStatusHistoryFactory extends AbstractFactory
- {
- public function create(OrderShopInterface $orderShop, string $status, string $origin = OrderStatusHistoryModel::ORIGIN_USER): OrderStatusHistoryInterface
- {
- $orderStatusHistory = new OrderStatusHistory();
-
- $orderStatusHistory->setOrderShop($orderShop);
- $orderStatusHistory->setOrderStatus($status);
- $orderStatusHistory->setOrigin($origin);
-
- return $orderStatusHistory;
- }
-
- }
|