<?php
namespace App\Controller;
use App\Repository\AperitifsRepository;
use App\Repository\BieresRepository;
use App\Repository\BoissonChaudesRepository;
use App\Repository\BurgerRepository;
use App\Repository\CafeRepository;
use App\Repository\ChampagneRepository;
use App\Repository\CocktailRepository;
use App\Repository\DessertsRepository;
use App\Repository\DigestifsRepository;
use App\Repository\EauxRepository;
use App\Repository\EntreeRepository;
use App\Repository\GlaceRepository;
use App\Repository\GratinsRepository;
use App\Repository\JusDeFruitRepository;
use App\Repository\KirsRepository;
use App\Repository\PatesRepository;
use App\Repository\PizzasRepository;
use App\Repository\PlancheAperoRepository;
use App\Repository\PoissonsRepository;
use App\Repository\SaladesRepository;
use App\Repository\SiropsRepository;
use App\Repository\SodaRepository;
use App\Repository\TheRepository;
use App\Repository\ViandesRepository;
use App\Repository\VinsAuVerreRepository;
use App\Repository\VinsPBRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class BaseController extends AbstractController
{
#[Route('/', name: 'index')]
public function index()
{
return $this->render('pages/index.html.twig');
}
#[Route('/aperitif', name: 'aperitif')]
public function aperitif(AperitifsRepository $aperitifsRepository, KirsRepository $kirsRepository, BieresRepository $bieresRepository, ChampagneRepository $champagneRepository, DigestifsRepository $digestifsRepository)
{
$aperitifs = $aperitifsRepository->findAll('DESC');
$kirs = $kirsRepository->findAll('DESC');
$bieres = $bieresRepository->findAll('DESC');
$champagnes = $champagneRepository->findAll('DESC');
$digestifs = $digestifsRepository->findAll('DESC');
return $this->render('pages/aperitif.html.twig', [
'aperitifs' => $aperitifs,
'kirs' => $kirs,
'bieres' => $bieres,
'champagnes' => $champagnes,
'digestifs' => $digestifs,
'current_menu' => 'aperitif'
]);
}
#[Route('/cocktail', name: 'cocktail')]
public function cocktail(CocktailRepository $cocktailRepository)
{
$cocktails = $cocktailRepository->findAll('DESC');
return $this->render('pages/cocktail.html.twig', [
'cocktails' => $cocktails,
'current_menu' => 'cocktail'
]);
}
#[Route('/boisson', name: 'boisson')]
public function boisson(SodaRepository $sodaRepository, EauxRepository $eauxRepository, JusDeFruitRepository $jusDeFruitRepository, SiropsRepository $siropsRepository)
{
$sodas = $sodaRepository->findAll('DESC');
$eaux = $eauxRepository->findAll('DESC');
$jus = $jusDeFruitRepository->findAll('DESC');
$sirops = $siropsRepository->findAll('DESC');
return $this->render('pages/boisson.html.twig', [
'sodas' => $sodas,
'eaux' => $eaux,
'jus' => $jus,
'sirops' => $sirops,
'current_menu' => 'boisson'
]);
}
#[Route('/boissons-chaudes', name: 'boissonChaude')]
public function boissonChaude(CafeRepository $cafeRepository, TheRepository $theRepository, BoissonChaudesRepository $boissonChaudesRepository)
{
$cafes = $cafeRepository->findAll('DESC');
$thes = $theRepository->findAll('DESC');
$boissonsChaudes = $boissonChaudesRepository->findAll('DESC');
return $this->render('pages/boissonChaudes.html.twig', [
'cafes' => $cafes,
'thes' => $thes,
'boissonsChaudes' => $boissonsChaudes,
'current_menu' => 'boissonChaude'
]);
}
#[Route('/desserts', name: 'dessert')]
public function dessert(DessertsRepository $dessertsRepository, GlaceRepository $glaceRepository)
{
$desserts = $dessertsRepository->findAll('DESC');
$glaces = $glaceRepository->findAll('DESC');
return $this->render('pages/dessert.html.twig', [
'desserts' => $desserts,
'glaces' => $glaces,
'current_menu' => 'dessert'
]);
}
#[Route('/nos-vins', name: 'vin')]
public function vin(VinsPBRepository $vinsPBRepository, VinsAuVerreRepository $vinsAuVerreRepository)
{
$vinsPB = $vinsPBRepository->findAll('DESC');
$vinsV = $vinsAuVerreRepository->findAll('DESC');
return $this->render('pages/vin.html.twig', [
'vinsPB' => $vinsPB,
'vinsV' => $vinsV,
'current_menu' => 'vin'
]);
}
#[Route('/entrees-et-salades', name: 'entree')]
public function entree(EntreeRepository $entreeRepository, SaladesRepository $saladesRepository)
{
$entrees = $entreeRepository->findAllActive();
$salades = $saladesRepository->findAllActive();
return $this->render('pages/entree.html.twig', [
'entrees' => $entrees,
'salades' => $salades,
'current_menu' => 'entree'
]);
}
#[Route('/plats', name: 'plat')]
public function plat(ViandesRepository $viandesRepository, PoissonsRepository $poissonsRepository)
{
$viandes = $viandesRepository->findAllActive();
$poissons = $poissonsRepository->findAllActive();
return $this->render('pages/plat.html.twig', [
'viandes' => $viandes,
'poissons' => $poissons,
'current_menu' => 'plat'
]);
}
#[Route('/pates-et-gratin', name: 'pates')]
public function pates(PatesRepository $patesRepository, GratinsRepository $gratinsRepository)
{
$pates = $patesRepository->findAllActive();
$gratins = $gratinsRepository->findAllActive();
return $this->render('pages/pates.html.twig', [
'pates' => $pates,
'gratins' => $gratins,
'current_menu' => 'pates'
]);
}
#[Route('/burgers', name: 'burger')]
public function burger(BurgerRepository $burgerRepository)
{
$burgers = $burgerRepository->findAllActive();
return $this->render('pages/burger.html.twig', [
'burgers' => $burgers,
'current_menu' => 'burger'
]);
}
#[Route('/pizzas', name: 'pizza')]
public function pizza(PizzasRepository $pizzasRepository)
{
$pizzas = $pizzasRepository->findAllActive();
return $this->render('pages/pizza.html.twig', [
'pizzas' => $pizzas,
'current_menu' => 'pizza'
]);
}
#[Route('/formules', name: 'formule')]
public function formules()
{
return $this->render('pages/formule.html.twig', [
'current_menu' => 'formule'
]);
}
#[Route('/assiette-apero', name: 'planche')]
public function planche(PlancheAperoRepository $plancheAperoRepository)
{
$planches = $plancheAperoRepository->findAllActive();
return $this->render('pages/planche.html.twig', [
'planches' => $planches,
'current_menu' => 'planche'
]);
}
}