Guest User

Untitled

a guest
May 20th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. routing:
  2.  
  3. CaasSampleBundle:
  4. resource: "@CaasSampleBundle/Controller/"
  5. type: annotation
  6. prefix: /
  7.  
  8. Controller
  9.  
  10.  
  11. <?php
  12.  
  13. namespace Caas\Bundle\SampleBundle\Controller;
  14.  
  15. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  16. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  17. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  18. use Caas\Bundle\SampleBundle\Form\LoginType;
  19.  
  20. class DefaultController extends Controller
  21. {
  22.  
  23. /**
  24. * @Route("/login", name="login")
  25. * @Template()
  26. */
  27. public function loginAction()
  28. {
  29. $form = $this->get('form.factory')->create(new LoginType());
  30.  
  31. return array('form' => $form->createView());
  32. }
  33.  
  34. }
Add Comment
Please, Sign In to add comment