Moved everything under annotations.
Some review is still needed.
This commit is contained in:
		@@ -6,12 +6,16 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 | 
			
		||||
use Symfony\Component\Security\Core\SecurityContext;
 | 
			
		||||
use Symfony\Component\HttpFoundation\Request;
 | 
			
		||||
use Symfony\Component\Security\Core\User\UserInterface;
 | 
			
		||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 | 
			
		||||
 | 
			
		||||
use KekRozsak\FrontBundle\Entity\User;
 | 
			
		||||
use KekRozsak\FrontBundle\Form\Type\UserType;
 | 
			
		||||
 | 
			
		||||
class DefaultController extends Controller
 | 
			
		||||
{
 | 
			
		||||
	/**
 | 
			
		||||
	 * @Route("/login", name="KekRozsakSecurityBundle_login")
 | 
			
		||||
	 */
 | 
			
		||||
	public function loginAction()
 | 
			
		||||
	{
 | 
			
		||||
		$request = $this->getRequest();
 | 
			
		||||
@@ -33,6 +37,25 @@ class DefaultController extends Controller
 | 
			
		||||
		));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @Route("/login_check", name="KekRozsakSecurityBundle_login_check")
 | 
			
		||||
	 */
 | 
			
		||||
	public function loginCheckAction()
 | 
			
		||||
	{
 | 
			
		||||
		// The security layer will intercept this request. This method will never be called.
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @Route("/logout", name="KekRozsakSecurityBundle_logout")
 | 
			
		||||
	 */
 | 
			
		||||
	 public function logoutAction()
 | 
			
		||||
	 {
 | 
			
		||||
		// The security layer will intercept this request. This method will never be called.
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @Route("/jelentkezes", name="KekRozsakSecurityBundle_registration")
 | 
			
		||||
	 */
 | 
			
		||||
	public function registrationAction(Request $request)
 | 
			
		||||
	{
 | 
			
		||||
		$user = $this->get('security.context')->getToken()->getUser();
 | 
			
		||||
@@ -73,6 +96,9 @@ class DefaultController extends Controller
 | 
			
		||||
		));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @Route("/most-varj", name="KekRozsakSecurityBundle_reg_success")
 | 
			
		||||
	 */
 | 
			
		||||
	public function registrationSuccessAction()
 | 
			
		||||
	{
 | 
			
		||||
		return $this->render('KekRozsakSecurityBundle:Default:registration_success.html.twig', array());
 | 
			
		||||
 
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
KekRozsakSecurityBundle_login:
 | 
			
		||||
        pattern:  /login
 | 
			
		||||
        defaults:
 | 
			
		||||
                _controller: KekRozsakSecurityBundle:Default:login
 | 
			
		||||
 | 
			
		||||
KekRozsakSecurityBundle_login_check:
 | 
			
		||||
        pattern:  /login_check
 | 
			
		||||
 | 
			
		||||
KekRozsakSecurityBundle_logout:
 | 
			
		||||
        pattern:  /logout
 | 
			
		||||
 | 
			
		||||
KekRozsakSecurityBundle_registration:
 | 
			
		||||
        pattern:  /jelentkezes
 | 
			
		||||
        defaults:
 | 
			
		||||
                _controller: KekRozsakSecurityBundle:Default:registration
 | 
			
		||||
 | 
			
		||||
KekRozsakSecurityBundle_reg_success:
 | 
			
		||||
        pattern:  /most-varj
 | 
			
		||||
        defaults:
 | 
			
		||||
                _controller: KekRozsakSecurityBundle:Default:registrationSuccess
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{# vim: ft=htmljinja: #}
 | 
			
		||||
{# vim: ft=htmljinja:
 | 
			
		||||
#}
 | 
			
		||||
{% extends '::main_template.html.twig' %}
 | 
			
		||||
{% form_theme form 'KekRozsakFrontBundle:Form:user_form.html.twig' %}
 | 
			
		||||
{% block title %} - Regisztráció {% endblock %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user