Controller/Backend/LanguageController.php
public function searchAction(Request $request)
    {
        $this->get('session')->remove('language_search_session');

        if ($request->getMethod() === Request::METHOD_POST) {

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

            $form->handleRequest($request);

            $this->get('session')->set('language_search_session',serialize($form->getData()));
        }

        return $this->redirect($this->generateUrl('admin_language'));
    }
public function searchAction(Request $request)
    {
        $this->get('session')->remove('language_search_session');

        if ($request->getMethod() === Request::METHOD_POST) {

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

            $form->handleRequest($request);

            $this->get('session')->set('language_search_session',serialize($form->getData()));
        }

        return $this->redirect($this->generateUrl('admin_language'));
    }
public function searchAction ( Request $ request ) { $ this -> get ( 'session' ) -> remove ( 'language_search_session' ) ; if ( $ request -> getMethod ( ) === Request :: METHOD_POST ) { $ form = $ this -> createForm ( new LanguageFormType ( ) , new Language ( ) , array ( 'search' => true , ) ) ; $ form -> handleRequest ( $ request ) ; $ this -> get ( 'session' ) -> set ( 'language_search_session' , serialize ( $ form -> getData ( ) ) ) ; } return $ this -> redirect ( $ this -> generateUrl ( 'admin_language' ) ) ; }
Search filter Language entities.

@Route("/search", name="admin_language_search")
@Method({"POST","GET"})
@Security("has_role('ROLE_ADMIN')")
@Template()
Search filter Language entities .