src/Controller/Front/PrivacyController.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Entity\PrivacyPolicy;
  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 PrivacyController extends AbstractController
  10. {
  11.     /**
  12.      * @Route("privacy-policy", name="app_front_privacy")
  13.      */
  14.     public function privacy(AccessClientService $accessClientServiceEntityManagerInterface $entityManager): Response
  15.     {
  16.         $accessClientService->handleAccessControl();
  17.         $privacyPolicy $entityManager->getRepository(PrivacyPolicy::class)->findBy([], ['id' => 'ASC']);
  18.         return $this->render('front/privacy/privacy-policy.html.twig', [
  19.             'privacyPolicy' => $privacyPolicy
  20.         ]);
  21.     }
  22. }