Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.traiteur-75.fr_1689065491
/
htdocs
/
src
/
Controller
/
front
/
/srv/data/trash/vhost_www.traiteur-75.fr_1689065491/htdocs/src/Controller/front/PageController.php
<?php namespace App\Controller\front; use App\Repository\ProductRepository; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class PageController extends AbstractController { /** * @Route("/", name="app_home") */ public function home(ProductRepository $productRepository): Response { $productsFavorite = $productRepository->findBy(['isFavorite' => true, "isDelete"=>false] ); $arrayProducts = $productRepository->getMostLikedProduct(4); $productsMostLike = []; foreach ($arrayProducts as $product) { array_push($productsMostLike, $product[0]); } return $this->render('front/page/index.html.twig', [ 'productsFavorite' => $productsFavorite, 'productsMostLike' => $productsMostLike ]); } /** * @Route("/concept", name="app_concept") */ public function concept(): Response { return $this->render('front/page/concept.html.twig', [ 'controller_name' => 'PageController', ]); } /** * @Route("/boutique", name="app_boutique") */ public function boutique(): Response { return $this->render('front/page/boutique.html.twig', [ ]); } /** * @Route("/livraison", name="app_delivery") */ public function delivery(): Response { return $this->render('front/page/delivery.html.twig', [ ]); } }