您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

OrderStatusHistoryFactory.php 794B

3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
123456789101112131415161718192021222324
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Order;
  3. use App\Entity\Order\OrderStatusHistory;
  4. use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
  5. use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface;
  6. use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryModel;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. class OrderStatusHistoryFactory extends AbstractFactory
  9. {
  10. public function create(OrderShopInterface $orderShop, string $status, string $origin = OrderStatusHistoryModel::ORIGIN_USER): OrderStatusHistoryInterface
  11. {
  12. $orderStatusHistory = new OrderStatusHistory();
  13. $orderStatusHistory->setOrderShop($orderShop);
  14. $orderStatusHistory->setOrderStatus($status);
  15. $orderStatusHistory->setOrigin($origin);
  16. return $orderStatusHistory;
  17. }
  18. }