|
|
@@ -90,9 +90,12 @@ class FavoriteController extends AbstractController |
|
|
|
private function _getProductFamily($request) |
|
|
|
{ |
|
|
|
$idProductFamily = $request->request->get('idProductFamily'); |
|
|
|
$productFamily = $this->getProductFamilyContainer()->getStore()->getOneById($idProductFamily); |
|
|
|
|
|
|
|
if ($productFamily) { |
|
|
|
if($idProductFamily) { |
|
|
|
$productFamily = $this->getProductFamilyContainer()->getStore()->getOneById($idProductFamily); |
|
|
|
} |
|
|
|
|
|
|
|
if (isset($productFamily) && $productFamily) { |
|
|
|
return $productFamily; |
|
|
|
} else { |
|
|
|
throw new \ErrorException('Ce produit est introuvable'); |