<?php
namespace App\Controller\Front;
use App\Entity\Booking;
use App\Entity\Page;
use App\Entity\Territory;
use App\Form\BookingType;
use App\Repository\BookingRepository;
use App\Services\BookingManager;
use App\Services\EmailManager;
use App\Services\OfferManager;
use App\Services\StripeManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class PageController extends AbstractController
{
#[Route('/politique-de-confidentialite', name: 'politique_de_confidentialite')]
public function politique(): Response
{
$em = $this->getDoctrine()->getManager();
$page = $em->getRepository(Page::class)->findOneBySlug('politique-de-confidentialite');
return $this->render('front/page/index.html.twig',[
'page' => $page
]);
}
#[Route('/cgv', name: 'cgv')]
public function cgv(): Response
{
$em = $this->getDoctrine()->getManager();
$page = $em->getRepository(Page::class)->findOneBySlug('cgv');
return $this->render('front/page/index.html.twig',[
'page' => $page
]);
}
#[Route('/mentions-legale', name: 'mention_legale')]
public function mentionLegale(): Response
{
$em = $this->getDoctrine()->getManager();
$page = $em->getRepository(Page::class)->findOneBySlug('mentions-legale');
return $this->render('front/page/index.html.twig',[
'page' => $page
]);
}
}