Sonata\BasketBundle\Controller\Api\BasketController::getProduct PHP Метод

getProduct() защищенный Метод

Retrieves product with id $id or throws an exception if it doesn't exist.
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;
    }