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.

OrderProductFactory.php 582B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
12345678910111213141516171819202122
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Order;
  3. use App\Entity\Order\OrderProduct;
  4. use Lc\CaracoleBundle\Model\Order\OrderProductInterface;
  5. use Lc\CaracoleBundle\Model\Product\ProductInterface;
  6. use Lc\SovBundle\Factory\AbstractFactory;
  7. class OrderProductFactory extends AbstractFactory
  8. {
  9. public function create(ProductInterface $product, int $quantityOrder): OrderProductInterface
  10. {
  11. $orderProduct = new OrderProduct();
  12. $orderProduct->setProduct($product);
  13. $orderProduct->setQuantityOrder($quantityOrder);
  14. return $orderProduct;
  15. }
  16. }