src/Controller/Front/PageController.php line 36

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Entity\Booking;
  4. use App\Entity\Page;
  5. use App\Entity\Territory;
  6. use App\Form\BookingType;
  7. use App\Repository\BookingRepository;
  8. use App\Services\BookingManager;
  9. use App\Services\EmailManager;
  10. use App\Services\OfferManager;
  11. use App\Services\StripeManager;
  12. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  13. use Symfony\Component\HttpFoundation\JsonResponse;
  14. use Symfony\Component\HttpFoundation\RedirectResponse;
  15. use Symfony\Component\HttpFoundation\Request;
  16. use Symfony\Component\HttpFoundation\Response;
  17. use Symfony\Component\Routing\Annotation\Route;
  18. class PageController extends AbstractController
  19. {
  20.     #[Route('/politique-de-confidentialite'name'politique_de_confidentialite')]
  21.     public function politique(): Response
  22.     {
  23.         $em $this->getDoctrine()->getManager();
  24.         $page $em->getRepository(Page::class)->findOneBySlug('politique-de-confidentialite');
  25.         return $this->render('front/page/index.html.twig',[
  26.             'page' => $page
  27.         ]);
  28.     }
  29.     #[Route('/cgv'name'cgv')]
  30.     public function cgv(): Response
  31.     {
  32.         $em $this->getDoctrine()->getManager();
  33.         $page $em->getRepository(Page::class)->findOneBySlug('cgv');
  34.         return $this->render('front/page/index.html.twig',[
  35.             'page' => $page
  36.         ]);
  37.     }
  38.     #[Route('/mentions-legale'name'mention_legale')]
  39.     public function mentionLegale(): Response
  40.     {
  41.         $em $this->getDoctrine()->getManager();
  42.         $page $em->getRepository(Page::class)->findOneBySlug('mentions-legale');
  43.         return $this->render('front/page/index.html.twig',[
  44.             'page' => $page
  45.         ]);
  46.     }
  47. }