src/Controller/SecurityController.php line 23
<?phpnamespace App\Controller;use App\Form\SecurityForm;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;final class SecurityController extends AbstractController{private AuthenticationUtils $authenticationUtils;public function __construct(AuthenticationUtils $authenticationUtils){$this->authenticationUtils = $authenticationUtils;}/*** @Route("/admin/login", name="login")*/public function login(): Response{$form = $this->createForm(SecurityForm::class, ['email' => $this->authenticationUtils->getLastUsername(),]);return $this->render('security/login.html.twig', ['last_username' => $this->authenticationUtils->getLastUsername(),'form' => $form->createView(),'error' => $this->authenticationUtils->getLastAuthenticationError(),]);}/*** @Route("/admin/logout", name="logout")*/public function logout(): void{// Left empty intentionally because this will be handled by Symfony.}}