src/Controller/LegalController.php line 34

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Repository\LegalRepository;
  4. use App\Service\StaticData;
  5. use App\Repository\PageHeaderRepository;
  6. use App\Repository\PrivacyRepository;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  10. class LegalController extends AbstractController
  11. {
  12.     /**
  13.      * @Route("/mentions-legales", name="legal_index")
  14.      */
  15.     public function legalNotice(PageHeaderRepository $pageRepoStaticData $staticsLegalRepository $legalRepo): Response
  16.     {
  17.         $page $pageRepo->findOneBy(['page' => 'legal_notice']);
  18.         $statics $statics->getStaticData();
  19.         $content $legalRepo->findOneBy([]);
  20.         return $this->render('legal/index.html.twig', [
  21.             'statics' => $statics['data'],
  22.             'content' => $content,
  23.             'page' => $page,
  24.         ]);
  25.     }
  26.     /**
  27.      * @Route("/politique-de-confidentialite", name="privacy_index")
  28.      */
  29.     public function privacyPolicy(PageHeaderRepository $pageRepoStaticData $staticsPrivacyRepository $privacylRepo): Response
  30.     {
  31.         $page $pageRepo->findOneBy(['page' => 'privacy_policy']);
  32.         $statics $statics->getStaticData();
  33.         $content $privacylRepo->findOneBy([]);
  34.         return $this->render('legal/index.html.twig', [
  35.             'statics' => $statics['data'],
  36.             'content' => $content,
  37.             'page' => $page,
  38.         ]);
  39.     }
  40. }