/**
  * return the Response object associated to the list action
  *
  * @return Response
  */
 public function listAction()
 {
     if (false === $this->admin->isGranted('LIST')) {
         throw new AccessDeniedException();
     }
     $datagrid = $this->admin->getDatagrid();
     $formView = $datagrid->getForm()->createView();
     // set the theme for the current Admin Form
     $this->get('twig')->getExtension('form')->setTheme($formView, $this->admin->getFilterTheme());
     return $this->render($this->admin->getListTemplate(), array('action' => 'list', 'form' => $formView, 'datagrid' => $datagrid));
 }
    /**
     * return the Response object associated to the list action
     *
     * @return Response
     */
    public function listAction()
    {
        if (false === $this->admin->isGranted('LIST')) {
            throw new AccessDeniedException();
        }

        return $this->render($this->admin->getListTemplate(), array(
            'action'            => 'list',
            'admin'             => $this->admin,
            'base_template'     => $this->getBaseTemplate(),
        ));
    }
 /**
  * return the Response object associated to the list action
  *
  * @return Response
  */
 public function listAction()
 {
     return $this->render($this->admin->getListTemplate(), array('action' => 'list', 'admin' => $this->admin, 'base_template' => $this->getBaseTemplate()));
 }