Controller/Backend/LanguageController.php
public function indexAction($page,$sort,$direction)
    {
        $breadcumbs = $this->container->get('bacon_breadcrumbs');

        $breadcumbs->addItem(array(
            'title' => 'Language',
            'route' => '',
        ));

        $breadcumbs->addItem(array(
            'title' => 'List',
            'route' => '',
        ));

        $entity = new Language();
        $query = $this->getDoctrine()->getRepository('BaconLanguageBundle:Language')->getQueryPagination($entity,$sort,$direction);

        if ($this->get('session')->has('language_search_session')) {
            $objSerialize = $this->get('session')->get('language_search_session');
            $entity = unserialize($objSerialize);
            $query = $this->getDoctrine()->getRepository('BaconLanguageBundle:Language')->getQueryPagination($entity,$sort,$direction);
        }

        $paginator = $this->getPagination($query,$page,Language::PER_PAGE);
        $paginator->setUsedRoute('admin_language_pagination');

        $form = $this->createForm(new LanguageFormType(),$entity,array(
            'search' => true,
        ));

        return array(
            'pagination' => $paginator,
            'form_search' => $form->createView(),
            'form_delete' => $this->createDeleteForm()->createView(),
        );
    }
public function indexAction($page,$sort,$direction)
    {
        $breadcumbs = $this->container->get('bacon_breadcrumbs');

        $breadcumbs->addItem(array(
            'title' => 'Language',
            'route' => '',
        ));

        $breadcumbs->addItem(array(
            'title' => 'List',
            'route' => '',
        ));

        $entity = new Language();
        $query = $this->getDoctrine()->getRepository('BaconLanguageBundle:Language')->getQueryPagination($entity,$sort,$direction);

        if ($this->get('session')->has('language_search_session')) {
            $objSerialize = $this->get('session')->get('language_search_session');
            $entity = unserialize($objSerialize);
            $query = $this->getDoctrine()->getRepository('BaconLanguageBundle:Language')->getQueryPagination($entity,$sort,$direction);
        }

        $paginator = $this->getPagination($query,$page,Language::PER_PAGE);
        $paginator->setUsedRoute('admin_language_pagination');

        $form = $this->createForm(new LanguageFormType(),$entity,array(
            'search' => true,
        ));

        return array(
            'pagination' => $paginator,
            'form_search' => $form->createView(),
            'form_delete' => $this->createDeleteForm()->createView(),
        );
    }
public function indexAction ( $ page , $ sort , $ direction ) { $ breadcumbs = $ this -> container -> get ( 'bacon_breadcrumbs' ) ; $ breadcumbs -> addItem ( array ( 'title' => 'Language' , 'route' => '' , ) ) ; $ breadcumbs -> addItem ( array ( 'title' => 'List' , 'route' => '' , ) ) ; $ entity = new Language ( ) ; $ query = $ this -> getDoctrine ( ) -> getRepository ( 'BaconLanguageBundle:Language' ) -> getQueryPagination ( $ entity , $ sort , $ direction ) ; if ( $ this -> get ( 'session' ) -> has ( 'language_search_session' ) ) { $ objSerialize = $ this -> get ( 'session' ) -> get ( 'language_search_session' ) ; $ entity = unserialize ( $ objSerialize ) ; $ query = $ this -> getDoctrine ( ) -> getRepository ( 'BaconLanguageBundle:Language' ) -> getQueryPagination ( $ entity , $ sort , $ direction ) ; } $ paginator = $ this -> getPagination ( $ query , $ page , Language :: PER_PAGE ) ; $ paginator -> setUsedRoute ( 'admin_language_pagination' ) ; $ form = $ this -> createForm ( new LanguageFormType ( ) , $ entity , array ( 'search' => true , ) ) ; return array ( 'pagination' => $ paginator , 'form_search' => $ form -> createView ( ) , 'form_delete' => $ this -> createDeleteForm ( ) -> createView ( ) , ) ; }
Lists all Language entities.

@Route("/",defaults={"page"=1, "sort"="id", "direction"="asc"}, name="admin_language")
@Route("/page/{page}/sort/{sort}/direction/{direction}/", defaults={"page"=1, "sort"="id", "direction"="asc"}, name="admin_language_pagination")
@Method("GET")
@Security("has_role('ROLE_ADMIN')")
@Template()
Lists all Language entities .