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

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

Retrieves basket with id $id or throws an exception if it doesn't exist.
protected getBasket ( $id ) : Sonata\Component\Basket\BasketInterface
$id
Результат Sonata\Component\Basket\BasketInterface
    protected function getBasket($id)
    {
        $basket = $this->basketManager->findOneBy(array('id' => $id));
        if (null === $basket) {
            throw new NotFoundHttpException(sprintf('Basket (%d) not found', $id));
        }
        return $basket;
    }