src/Controller/FaqController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Component\HttpFoundation\Response;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Doctrine\ORM\EntityManagerInterface;
  7. use App\Entity\Faq;
  8. use Symfony\Component\HttpFoundation\Request;
  9. class FaqController extends AbstractController
  10. {
  11.     #[Route('/studio/faq'name'app_faq')]
  12.     public function index(Request $requestEntityManagerInterface $entityManager)
  13.     {
  14.         //On récupère l'objet faq par le null de la catégorie 
  15.         $faqs $entityManager->getRepository(Faq::class)
  16.             ->findBy(array('categorySeance' => null'isActive' => 1));
  17.         return $this->render('faq/index.html.twig', ['faqs' => $faqs]);
  18.     }
  19. }