src/Controller/PrivaciesController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Privacy;
  4. use Doctrine\ORM\EntityManagerInterface;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  8. class PrivaciesController extends AbstractController
  9. {
  10.     /**
  11.      * @Route("/privacies", name="app_privacies")
  12.      */
  13.     public function privacies(EntityManagerInterface $entityManager): Response
  14.     {
  15.         $privacies $entityManager->getRepository(Privacy::class)->findAll();
  16.         return $this->render('privacies/show_privacies.html.twig', [
  17.             'privacies' => $privacies,
  18.         ]);
  19.     }
  20.                             
  21. }