|
|
|
|
|
|
|
|
private function _getProductFamily($request) |
|
|
private function _getProductFamily($request) |
|
|
{ |
|
|
{ |
|
|
$idProductFamily = $request->request->get('idProductFamily'); |
|
|
$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; |
|
|
return $productFamily; |
|
|
} else { |
|
|
} else { |
|
|
throw new \ErrorException('Ce produit est introuvable'); |
|
|
throw new \ErrorException('Ce produit est introuvable'); |