public function login(Request $request)
    {
        try {
            $this->getApplicationBox()->get_connection();
        } catch (\Exception $e) {
            $this->app->addFlash('error', $this->app->trans('login::erreur: No available connection - Please contact sys-admin'));
        }

        $feeds = $this->getFeedRepository()->findBy(['public' => true], ['updatedOn' => 'DESC']);

        $form = $this->app->form(new PhraseaAuthenticationForm($this->app));
        $form->setData([
            'redirect' => $request->query->get('redirect')
        ]);

        return $this->render('login/index.html.twig', array_merge(
            $this->getDefaultTemplateVariables($request),
            [
                'feeds' => $feeds,
                'form'  => $form->createView(),
            ]));
    }
public function login(Request $request)
    {
        try {
            $this->getApplicationBox()->get_connection();
        } catch (\Exception $e) {
            $this->app->addFlash('error', $this->app->trans('login::erreur: No available connection - Please contact sys-admin'));
        }

        $feeds = $this->getFeedRepository()->findBy(['public' => true], ['updatedOn' => 'DESC']);

        $form = $this->app->form(new PhraseaAuthenticationForm($this->app));
        $form->setData([
            'redirect' => $request->query->get('redirect')
        ]);

        return $this->render('login/index.html.twig', array_merge(
            $this->getDefaultTemplateVariables($request),
            [
                'feeds' => $feeds,
                'form'  => $form->createView(),
            ]));
    }
public function login ( Request $ request ) { try { $ this -> getApplicationBox ( ) -> get_connection ( ) ; } catch ( \ Exception $ e ) { $ this -> app -> addFlash ( 'error' , $ this -> app -> trans ( 'login::erreur: No available connection - Please contact sys-admin' ) ) ; } $ feeds = $ this -> getFeedRepository ( ) -> findBy ( [ 'public' => true ] , [ 'updatedOn' => 'DESC' ] ) ; $ form = $ this -> app -> form ( new PhraseaAuthenticationForm ( $ this -> app ) ) ; $ form -> setData ( [ 'redirect' => $ request -> query -> get ( 'redirect' ) ] ) ; return $ this -> render ( 'login/index.html.twig' , array_merge ( $ this -> getDefaultTemplateVariables ( $ request ) , [ 'feeds' => $ feeds , 'form' => $ form -> createView ( ) , ] ) ) ; }
Login into Phraseanet

@param  Request $request The current request
@return Response
Login into Phraseanet