Files
ludikevent_crm/src/Controller/ReserverController.php

84 lines
2.9 KiB
PHP
Raw Normal View History

<?php
namespace App\Controller;
use App\Entity\Account;
use App\Entity\AccountResetPasswordRequest;
use App\Form\RequestPasswordConfirmType;
use App\Form\RequestPasswordRequestType;
use App\Logger\AppLogger;
use App\Service\ResetPassword\Event\ResetPasswordConfirmEvent;
use App\Service\ResetPassword\Event\ResetPasswordEvent;
use Doctrine\ORM\EntityManagerInterface;
use Fkrzski\RobotsTxt\RobotsTxt;
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class ReserverController extends AbstractController
{
#[Route('/robots.txt', name: 'robots_txt', defaults: ['_format' => 'txt'])]
public function index(Request $request): Response
{
$robots = new RobotsTxt();
$robots->disallow('/signature');
$robots->disallow('/payment');
$robots->crawlDelay(60);
$robots->allow('/reservation');
$robots->sitemap($request->getSchemeAndHttpHost().$this->generateUrl('PrestaSitemapBundle_index',['_format' => 'xml']));
return new Response($robots->toString(),Response::HTTP_OK,[
'Content-Type' => 'text/plain'
]);
}
#[Route('/reservation', name: 'reservation')]
public function revervation()
{
return $this->render('revervation/home.twig');
}
#[Route('/reservation/contact', name: 'reservation_contact')]
public function revervationContact()
{
return $this->render('revervation/home.twig');
}
#[Route('/reservation/recherche', name: 'reservation_search')]
public function recherche()
{
}
#[Route('/reservation/mentions-legal', name: 'reservation_mentions-legal')]
public function revervationLegal()
{
return $this->render('revervation/legal.twig');
}
#[Route('/reservation/rgpd', name: 'reservation_rgpd')]
public function revervationRgpd()
{
return $this->render('revervation/rgpd.twig');
}
#[Route('/reservation/cookies', name: 'reservation_cookies')]
public function revervationCookies()
{
return $this->render('revervation/cookies.twig');
}
#[Route('/reservation/cgv', name: 'reservation_cgv')]
public function revervationCgv()
{
return $this->render('revervation/cgv.twig');
}
#[Route('/reservation/hosting', name: 'reservation_hosting')]
public function revervationHosting()
{
return $this->render('revervation/hosting.twig');
}
}