src/Flexy/FrontBundle/Themes/IlaveU/Controller/PartialController.php line 39
<?php
namespace App\Flexy\FrontBundle\Themes\IlaveU\Controller;
use App\Flexy\FrontBundle\Repository\CategoryProductFrontRepository;
use App\Flexy\FrontBundle\Repository\MasterSliderRepository;
use App\Flexy\FrontBundle\Repository\MenuRepository;
use App\Flexy\FrontBundle\Repository\PubBannerRepository;
use App\Flexy\ShopBundle\Repository\Product\ProductRepository;
use App\Flexy\FrontBundle\Repository\ProductFrontRepository;
use App\Flexy\FrontBundle\Service\FlexyFrontProvider as ServiceFlexyFrontProvider;
use App\Service\FlexyFrontProvider;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Knp\Menu\Matcher\Matcher;
use Knp\Menu\MenuFactory;
use Knp\Menu\Renderer\ListRenderer;
class PartialController extends AbstractController
{
#[Route('/{_locale}/header', name: 'front_header')]
public function header(
MenuRepository $menuRepository,
ServiceFlexyFrontProvider $flexyFrontProvider
): Response
{
return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/_header.html.twig', [
"menu"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["isMainMenu"=>true])),
]);
}
#[Route('/{_locale}/footer', name: 'front_footer')]
public function footer(
MenuRepository $menuRepository,
ServiceFlexyFrontProvider $flexyFrontProvider
): Response
{
return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/_footer.html.twig', [
"menuLinks"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["name"=>"Liens utiles"])),
"menuServices"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["name"=>"Services"])),
"menuBottom"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["name"=>"Conditions de vente"])),
]);
}
}