src/Controller/SecurityController.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Informationeps;
  4. use App\Repository\InformationepsRepository;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
  8. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  9. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  10. class SecurityController extends AbstractController
  11. {
  12.     /**
  13.      * @Route("/login", name="app_login")
  14.      */
  15.     public function login(AuthenticationUtils $authenticationUtils): Response
  16.     {
  17.         // if ($this->getUser()) {
  18.         //     return $this->redirectToRoute('target_path');
  19.         // }
  20.         // get the login error if there is one
  21.         $error $authenticationUtils->getLastAuthenticationError();
  22.         // last username entered by the user
  23.         $lastUsername $authenticationUtils->getLastUsername();
  24.         $logo null;//$this->getDoctrine()->getRepository(Informationeps::class)->find(1)->getImageFiligrame();
  25.         return $this->render('admin/security/login.html.twig', ['last_username' => $lastUsername'error' => $error,'logo'=>$logo]);
  26.     }
  27.     /**
  28.      * @Route("/logout", name="app_logout")
  29.      */
  30.     public function logout(): void
  31.     {
  32.         //return $this->ret;
  33.         throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
  34.     }
  35. }