|
1234567891011121314151617181920212223242526 |
- <?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 = $this->createBase();
-
- $orderProduct->setProduct($product);
- $orderProduct->setQuantityOrder($quantityOrder);
-
- return $orderProduct;
- }
-
- public function createBase(){
- return new OrderProduct();
- }
-
- }
|