src/Controller/NotFoundController.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
  7. class NotFoundController extends AbstractController
  8. {
  9.     public function __construct(
  10.         protected ParameterBagInterface $parameters
  11.     )
  12.     {}
  13.     /**
  14.      * @Route("/{_locale}/404",name="app_error_404", methods={"GET"})
  15.      */
  16.     public function errorPageNotFound(): Response
  17.     {
  18.         return $this->render('error/error404.html.twig', [
  19.             "locales" => $this->parameters->get('app.locales'),
  20.         ]);
  21.     }
  22. }