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

indexAction() public method

public indexAction ( )
    public function indexAction()
    {
        $user = $this->get('security.context')->getToken()->getUser();
        $books = $this->get('baikal.repository.addressbook')->findByUser($user);
        $that = $this;
        return $this->render('BaikalFrontendBundle:Addressbook:list.html.twig', array('user' => $user, 'addressbooks' => $books, 'urls' => array('view' => function ($user, $addressbook) use(&$that) {
            return $that->generateUrl('baikal_frontend_addressbook_view', array('addressbook' => $addressbook->getId()));
        }, 'edit' => function ($user, $addressbook) use(&$that) {
            return $that->generateUrl('baikal_frontend_addressbook_form_edit', array('addressbook' => $addressbook->getId()));
        }, 'delete' => function ($user, $addressbook) use(&$that) {
            return $that->generateUrl('baikal_frontend_addressbook_list_delete', array('addressbook' => $addressbook->getId()));
        })));
    }