src/Controller/InformationsController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Article;
  4. use App\Entity\Category;
  5. use App\Repository\ArticleRepository;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  9. use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
  10. class InformationsController extends AbstractController
  11. {
  12.     #[Route('/mentions-legales'name'app_legal_notice')]
  13.     public function legalNotice(ArticleRepository $articleRepository): Response
  14.     {
  15.         $article $articleRepository->findOneBySlug('mentions-legales');
  16.         return $this->render('informations/legal_notice.html.twig', [
  17.             'article'=> $article,
  18.         ]);
  19.     }
  20.     #[Route('/politique-de-confidentialite'name'app_confidentiality')]
  21.     public function confidentiality(ArticleRepository $articleRepository): Response
  22.     {
  23.         $article $articleRepository->findOneBySlug('politique-de-confidentialite');
  24.         return $this->render('informations/confidentiality.html.twig', [
  25.             'article'=> $article,
  26.         ]);
  27.     }
  28. }