Controller/CartController.php
protected function securityCheck(Request $request)
    {
        if (!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
            $request->getSession()->set('_ekyna.login_success.target_path', 'ekyna_cart_informations');
            return $this->redirect($this->generateUrl('fos_user_security_login'));
        }
        return null;
    }
protected function securityCheck(Request $request)
    {
        if (!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
            $request->getSession()->set('_ekyna.login_success.target_path', 'ekyna_cart_informations');
            return $this->redirect($this->generateUrl('fos_user_security_login'));
        }
        return null;
    }
protected function securityCheck ( Request $ request ) { if ( ! $ this -> get ( 'security.authorization_checker' ) -> isGranted ( 'IS_AUTHENTICATED_REMEMBERED' ) ) { $ request -> getSession ( ) -> set ( '_ekyna.login_success.target_path' , 'ekyna_cart_informations' ) ; return $ this -> redirect ( $ this -> generateUrl ( 'fos_user_security_login' ) ) ; } return null ; }
Check that user is logged.

@param Request $request
@return null|\Symfony\Component\HttpFoundation\RedirectResponse
Check that user is logged .