Init project

This commit is contained in:
2026-01-11 16:19:42 +01:00
commit df59325836
380 changed files with 33805 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Controller;
use App\Entity\News;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
#[Route('/render/feature', name: 'render_feature_')]
final class RenderFeatureController extends AbstractController
{
private EntityManagerInterface $entityManager;
public function __construct(EntityManagerInterface $entityManager)
{
$this->entityManager = $entityManager;
}
#[Route('/news', name: 'news')]
public function news($isCarousel): Response
{
$news = $this->entityManager->getRepository(News::class)->findBy([], ['ordre' => 'ASC']);
return $this->render('render_feature/news.html.twig', [
'news' => $news,
'isCarousel' => $isCarousel
]);
}
}