Baikal\FrontendBundle\Controller\Addressbook\ViewController::indexAction PHP Method

indexAction() public method

public indexAction ( Request $request, Baikal\ModelBundle\Entity\Addressbook $addressbook )
$request Symfony\Component\HttpFoundation\Request
$addressbook Baikal\ModelBundle\Entity\Addressbook
    public function indexAction(Request $request, Addressbook $addressbook)
    {
        if (!$this->get('security.context')->isGranted('dav.read', $addressbook)) {
            throw new HttpException(401, 'Unauthorized access.');
        }
        $user = $this->get('security.context')->getToken()->getUser();
        return $this->render('BaikalFrontendBundle:Addressbook:view.html.twig', array('user' => $user, 'addressbook' => $addressbook));
    }
ViewController