src/Controller/Front/TermsController.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Entity\TermsConditions;
  4. use App\Service\AccessClientService;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. use Doctrine\ORM\EntityManagerInterface;
  9. class TermsController extends AbstractController
  10. {
  11.     /**
  12.      * @Route("/terms-and-conditions", name="app_front_terms")
  13.      */
  14.     public function terms(AccessClientService $accessClientServiceEntityManagerInterface $entityManager): Response
  15.     {
  16.         $accessClientService->handleAccessControl();
  17.         
  18.         $termsConditions $entityManager->getRepository(TermsConditions::class)->findBy([], ['id' => 'ASC']);
  19.         return $this->render('front/terms/terms-and-conditions.html.twig', [
  20.             'termsConditions' => $termsConditions
  21.         ]);
  22.     }
  23. }