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.
|
- <?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();
- }
-
- }
|