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 Lc\CaracoleBundle\Container\Order\OrderProductContainer;
- 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, float $quantityOrder): OrderProductInterface
- {
- $orderProduct = $this->createBase();
-
- $orderProduct->setProduct($product);
- $orderProduct->setQuantityOrder($quantityOrder);
-
- return $orderProduct;
- }
-
- public function createBase(){
- $class = OrderProductContainer::getEntityFqcn();
- return new $class;
- }
-
- }
|