[SecurityBundle] removed usage of the templating component
This commit is contained in:
parent
a97cdd63a2
commit
17240eb7e8
@ -24,14 +24,14 @@ class LoginController implements ContainerAwareInterface
|
||||
{
|
||||
$form = $this->container->get('form.factory')->create('Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType');
|
||||
|
||||
return $this->container->get('templating')->renderResponse('CsrfFormLoginBundle:Login:login.html.twig', array(
|
||||
return new Response($this->container->get('twig')->render('@CsrfFormLogin/Login/login.html.twig', array(
|
||||
'form' => $form->createView(),
|
||||
));
|
||||
)));
|
||||
}
|
||||
|
||||
public function afterLoginAction()
|
||||
{
|
||||
return $this->container->get('templating')->renderResponse('CsrfFormLoginBundle:Login:after_login.html.twig');
|
||||
return new Response($this->container->get('twig')->render('@CsrfFormLogin/Login/after_login.html.twig'));
|
||||
}
|
||||
|
||||
public function loginCheckAction()
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "::base.html.twig" %}
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
Hello {{ app.user.username }}!<br /><br />
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "::base.html.twig" %}
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
@ -30,11 +30,11 @@ class LocalizedController implements ContainerAwareInterface
|
||||
$error = $request->getSession()->get(Security::AUTHENTICATION_ERROR);
|
||||
}
|
||||
|
||||
return $this->container->get('templating')->renderResponse('FormLoginBundle:Localized:login.html.twig', array(
|
||||
return new Response($this->container->get('twig')->render('@FormLogin/Localized/login.html.twig', array(
|
||||
// last username entered by the user
|
||||
'last_username' => $request->getSession()->get(Security::LAST_USERNAME),
|
||||
'error' => $error,
|
||||
));
|
||||
)));
|
||||
}
|
||||
|
||||
public function loginCheckAction()
|
||||
|
@ -32,16 +32,16 @@ class LoginController implements ContainerAwareInterface
|
||||
$error = $request->getSession()->get(Security::AUTHENTICATION_ERROR);
|
||||
}
|
||||
|
||||
return $this->container->get('templating')->renderResponse('FormLoginBundle:Login:login.html.twig', array(
|
||||
return new Response($this->container->get('twig')->render('@FormLogin/Login/login.html.twig', array(
|
||||
// last username entered by the user
|
||||
'last_username' => $request->getSession()->get(Security::LAST_USERNAME),
|
||||
'error' => $error,
|
||||
));
|
||||
)));
|
||||
}
|
||||
|
||||
public function afterLoginAction(UserInterface $user)
|
||||
{
|
||||
return $this->container->get('templating')->renderResponse('FormLoginBundle:Login:after_login.html.twig', array('user' => $user));
|
||||
return new Response($this->container->get('twig')->render('@FormLogin/Login/after_login.html.twig', array('user' => $user)));
|
||||
}
|
||||
|
||||
public function loginCheckAction()
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "::base.html.twig" %}
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "::base.html.twig" %}
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
Hello {{ user.username }}!<br /><br />
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "::base.html.twig" %}
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
framework:
|
||||
templating: { engines: ['twig'] }
|
||||
|
||||
# Twig Configuration
|
||||
twig:
|
||||
debug: '%kernel.debug%'
|
||||
|
@ -32,7 +32,6 @@
|
||||
"symfony/framework-bundle": "~3.1",
|
||||
"symfony/http-foundation": "~2.8|~3.0",
|
||||
"symfony/security-acl": "~2.8|~3.0",
|
||||
"symfony/templating": "~2.8|~3.0",
|
||||
"symfony/twig-bundle": "~2.8|~3.0",
|
||||
"symfony/twig-bridge": "~2.8|~3.0",
|
||||
"symfony/process": "~2.8|~3.0",
|
||||
|
Reference in New Issue
Block a user