protected getProduct ( $id ) : Sonata\Component\Product\ProductInterface | ||
$id | ||
Результат | Sonata\Component\Product\ProductInterface |
protected function getProduct($id)
{
$product = $this->productManager->findOneBy(array('id' => $id));
if (null === $product) {
throw new NotFoundHttpException(sprintf('Product (%d) not found', $id));
}
return $product;
}