src/Controller/ThemesController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Theme;
  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 ThemesController extends AbstractController
  9. {
  10.     /**
  11.      * @Route("/themes", name="app_themes")
  12.      */
  13.     public function themes(EntityManagerInterface $entityManager): Response
  14.     {
  15.         $themes $entityManager->getRepository(Theme::class)->findAll();
  16.         return $this->render('themes/themes.html.twig', [
  17.             'themes' => $themes,
  18.         ]);
  19.     }
  20.                             
  21.     
  22. }