<?php
namespace App\Controller\Front;
use App\Repository\ContentRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class HomeController extends AbstractController
{
/**
* @Route("/", name="front_home_index")
*/
public function index(ContentRepository $contentRepository)
{
return $this->render('front/index.html.twig', [
'content_header' => $contentRepository->findOneBy(['page' => 'accueil', 'section' => 'header']),
'block_image_1' => $contentRepository->findOneBy(['page' => 'accueil', 'section' => 'block_image_1']),
'block_image_2' => $contentRepository->findOneBy(['page' => 'accueil', 'section' => 'block_image_2']),
'block_image_3' => $contentRepository->findOneBy(['page' => 'accueil', 'section' => 'block_image_3']),
'block_image_4' => $contentRepository->findOneBy(['page' => 'accueil', 'section' => 'block_image_4']),
'block_image_5' => $contentRepository->findOneBy(['page' => 'accueil', 'section' => 'block_image_5']),
'bandeau' => $contentRepository->findOneBy(['page' => 'accueil', 'section' => 'bandeau'])
]);
}
}