|
|
|
|
|
|
|
|
|
|
|
|
|
|
use App\Repository\Product\ProductFamilyStore; |
|
|
use App\Repository\Product\ProductFamilyStore; |
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
|
|
|
use Http\Discovery\Exception\NotFoundException; |
|
|
use Lc\CaracoleBundle\Factory\Order\OrderProductFactory; |
|
|
use Lc\CaracoleBundle\Factory\Order\OrderProductFactory; |
|
|
use Lc\CaracoleBundle\Solver\Product\ProductFamilySolver; |
|
|
use Lc\CaracoleBundle\Solver\Product\ProductFamilySolver; |
|
|
use Symfony\Component\Form\AbstractType; |
|
|
use Symfony\Component\Form\AbstractType; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(is_null($product)) { |
|
|
|
|
|
throw new NotFoundException('Aucun Product trouvé pour le ProductFamily #'.$productFamily->getId()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$orderProduct = $this->orderProductFactory->create($product, 1); |
|
|
$orderProduct = $this->orderProductFactory->create($product, 1); |
|
|
|
|
|
|
|
|
$builder->add('order_product_0', OrderProductType::class, [ |
|
|
$builder->add('order_product_0', OrderProductType::class, [ |