ParcBundle/Controller/PerrucheController.php line 20

Open in your IDE?
  1. <?php
  2. namespace ParcBundle\Controller;
  3. use App\Entity\Perruche;
  4. use Doctrine\ORM\EntityManagerInterface;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\HttpFoundation\Request;
  8. use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
  9. use Symfony\Component\Mime\Email;
  10. use Symfony\Component\Routing\Annotation\Route;
  11. use Symfony\Component\Mailer\MailerInterface;
  12. class PerrucheController extends AbstractController
  13. {
  14.     #[Route('/perruches'name'parc_perruche_index')]
  15.     public function index(EntityManagerInterface $entityManager)
  16.     {
  17.         //On récupère l'objet faq par le null de la catégorie 
  18.         $perruches $entityManager->getRepository(Perruche::class)
  19.             ->findByIsActive(true);
  20.         return $this->render('@parcbundle/parcbundle/perruche/index.html.twig', ['perruches' => $perruches]);
  21.     }
  22. }