src/Controller/Front/WelcomeController.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use FOS\UserBundle\Controller\SecurityController as FOSSecurityController;
  4. use Symfony\Component\HttpFoundation\Request;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class WelcomeController extends FOSSecurityController
  8. {
  9.     /**
  10.      * @Route("/welcome", name="malys_front_welcome")
  11.      */
  12.     public function welcome(): ?Response
  13.     {
  14.         $data json_decode(parent::loginAction()->getContent(), true);
  15.         return $this->render('front/security/welcome.html.twig'$data);
  16.     }
  17.     /**
  18.      * @Route("/account_opening", name="malys_front_account_opening")
  19.      *
  20.      */
  21.     public function accountOpening(): ?Response
  22.     {
  23.         return $this->render('front/security/panels/subscribe.html.twig');
  24.     }
  25.     /**
  26.      * Override to prevent unused render call and return parameter
  27.      *
  28.      */
  29.     protected function renderLogin(array $data): Response
  30.     {
  31.         return new Response(json_encode($data));
  32.     }
  33. }