src/Controller/AnnuairesController.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4.  * @author Mehrez Labidi
  5.  */
  6. namespace App\Controller;
  7. use Symfony\Component\HttpFoundation\Response;
  8. class AnnuairesController extends EntityUsingController
  9. {
  10.     public const MAX_AGE 43200// 12heures
  11.     public function index(): Response
  12.     {
  13.         $response =  $this->render('annuaires/index.html.twig', [
  14.             'controller_name' => 'AnnuairesController',
  15.         ]);
  16.         $response->setPublic();
  17.         $response->setMaxAge(self::MAX_AGE); // 12heures
  18.         return $response;
  19.     }
  20. }