original_string: public function indexAction($page, $sort, $direction)
      {
          $acl = $this->get('bacon_acl.service.authorization');
  
          if (!$acl->authorize('module', 'INDEX')) {
              throw $this->createAccessDeniedException();
          }
  
          $breadcumbs = $this->container->get('bacon_breadcrumbs');
  
          $breadcumbs->addItem([
              'title' => 'Module',
              'route' => '',
          ]);
  
          $breadcumbs->addItem([
              'title' => 'List',
              'route' => '',
          ]);
  
          $entity = new Module();
  
          if ($this->get('session')->has('module_search_session')) {
              $objSerialize = $this->get('session')->get('module_search_session');
              $entity = unserialize($objSerialize);
          }
  
          $query = $this->getDoctrine()->getRepository('BaconAclBundle:Module')->getQueryPagination($entity, $sort, $direction);
  
          $paginator = $this->getPagination($query, $page, Module::PER_PAGE);
          $paginator->setUsedRoute('module_pagination');
  
          $form = $this->createForm(ModuleFormType::class, $entity, [
              'search' => true,
          ]);
  
          return [
              'pagination'  => $paginator,
              'form_search' => $form->createView(),
              'form_delete' => $this->createDeleteForm()->createView(),
          ];
      }
code: public function indexAction($page, $sort, $direction)
      {
          $acl = $this->get('bacon_acl.service.authorization');
  
          if (!$acl->authorize('module', 'INDEX')) {
              throw $this->createAccessDeniedException();
          }
  
          $breadcumbs = $this->container->get('bacon_breadcrumbs');
  
          $breadcumbs->addItem([
              'title' => 'Module',
              'route' => '',
          ]);
  
          $breadcumbs->addItem([
              'title' => 'List',
              'route' => '',
          ]);
  
          $entity = new Module();
  
          if ($this->get('session')->has('module_search_session')) {
              $objSerialize = $this->get('session')->get('module_search_session');
              $entity = unserialize($objSerialize);
          }
  
          $query = $this->getDoctrine()->getRepository('BaconAclBundle:Module')->getQueryPagination($entity, $sort, $direction);
  
          $paginator = $this->getPagination($query, $page, Module::PER_PAGE);
          $paginator->setUsedRoute('module_pagination');
  
          $form = $this->createForm(ModuleFormType::class, $entity, [
              'search' => true,
          ]);
  
          return [
              'pagination'  => $paginator,
              'form_search' => $form->createView(),
              'form_delete' => $this->createDeleteForm()->createView(),
          ];
      }
code_tokens: public function indexAction ( $ page , $ sort , $ direction ) { $ acl = $ this -> get ( 'bacon_acl.service.authorization' ) ; if ( ! $ acl -> authorize ( 'module' , 'INDEX' ) ) { throw $ this -> createAccessDeniedException ( ) ; } $ breadcumbs = $ this -> container -> get ( 'bacon_breadcrumbs' ) ; $ breadcumbs -> addItem ( [ 'title' => 'Module' , 'route' => '' , ] ) ; $ breadcumbs -> addItem ( [ 'title' => 'List' , 'route' => '' , ] ) ; $ entity = new Module ( ) ; if ( $ this -> get ( 'session' ) -> has ( 'module_search_session' ) ) { $ objSerialize = $ this -> get ( 'session' ) -> get ( 'module_search_session' ) ; $ entity = unserialize ( $ objSerialize ) ; } $ query = $ this -> getDoctrine ( ) -> getRepository ( 'BaconAclBundle:Module' ) -> getQueryPagination ( $ entity , $ sort , $ direction ) ; $ paginator = $ this -> getPagination ( $ query , $ page , Module :: PER_PAGE ) ; $ paginator -> setUsedRoute ( 'module_pagination' ) ; $ form = $ this -> createForm ( ModuleFormType :: class , $ entity , [ 'search' => true , ] ) ; return [ 'pagination' => $ paginator , 'form_search' => $ form -> createView ( ) , 'form_delete' => $ this -> createDeleteForm ( ) -> createView ( ) , ] ; }
docstring: Lists all Module entities.
  
  @Route("/",defaults={"page"=1, "sort"="id", "direction"="asc"}, name="module")
  @Route("/page/{page}/sort/{sort}/direction/{direction}/", defaults={"page"=1, "sort"="id", "direction"="asc"}, name="module_pagination")
  @Method("GET")
  @Security("has_role('ROLE_ADMIN')")
  @Template()
docstring_tokens: Lists all Module entities .