|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Order;
-
- use App\Entity\Order\OrderProduct;
- use Lc\CaracoleBundle\Model\Order\OrderProductInterface;
- use Lc\CaracoleBundle\Model\Product\ProductInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class OrderProductFactory extends AbstractFactory
- {
- public function create(ProductInterface $product, int $quantityOrder): OrderProductInterface
- {
- $orderProduct = new OrderProduct();
-
- $orderProduct->setProduct($product);
- $orderProduct->setQuantityOrder($quantityOrder);
-
- return $orderProduct;
- }
-
- }
|