<?php
namespace App\Controller\Front;
use App\Entity\PrivacyPolicy;
use App\Service\AccessClientService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Doctrine\ORM\EntityManagerInterface;
class PrivacyController extends AbstractController
{
/**
* @Route("privacy-policy", name="app_front_privacy")
*/
public function privacy(AccessClientService $accessClientService, EntityManagerInterface $entityManager): Response
{
$accessClientService->handleAccessControl();
$privacyPolicy = $entityManager->getRepository(PrivacyPolicy::class)->findBy([], ['id' => 'ASC']);
return $this->render('front/privacy/privacy-policy.html.twig', [
'privacyPolicy' => $privacyPolicy
]);
}
}