<?php
namespace App\Controller\Front;
use App\Entity\TermsConditions;
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 TermsController extends AbstractController
{
/**
* @Route("/terms-and-conditions", name="app_front_terms")
*/
public function terms(AccessClientService $accessClientService, EntityManagerInterface $entityManager): Response
{
$accessClientService->handleAccessControl();
$termsConditions = $entityManager->getRepository(TermsConditions::class)->findBy([], ['id' => 'ASC']);
return $this->render('front/terms/terms-and-conditions.html.twig', [
'termsConditions' => $termsConditions
]);
}
}