src/Flexy/FrontBundle/Themes/IlaveU/Controller/PartialController.php line 39

  1. <?php
  2. namespace App\Flexy\FrontBundle\Themes\IlaveU\Controller;
  3. use App\Flexy\FrontBundle\Repository\CategoryProductFrontRepository;
  4. use App\Flexy\FrontBundle\Repository\MasterSliderRepository;
  5. use App\Flexy\FrontBundle\Repository\MenuRepository;
  6. use App\Flexy\FrontBundle\Repository\PubBannerRepository;
  7. use App\Flexy\ShopBundle\Repository\Product\ProductRepository;
  8. use App\Flexy\FrontBundle\Repository\ProductFrontRepository;
  9. use App\Flexy\FrontBundle\Service\FlexyFrontProvider as ServiceFlexyFrontProvider;
  10. use App\Service\FlexyFrontProvider;
  11. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  12. use Symfony\Component\HttpFoundation\Response;
  13. use Symfony\Component\Routing\Annotation\Route;
  14. use Knp\Menu\Matcher\Matcher;
  15. use Knp\Menu\MenuFactory;
  16. use Knp\Menu\Renderer\ListRenderer;
  17. class PartialController extends AbstractController
  18. {
  19.     #[Route('/{_locale}/header'name'front_header')]
  20.     public function header(
  21.         MenuRepository $menuRepository,
  22.         ServiceFlexyFrontProvider $flexyFrontProvider
  23.         
  24.         ): Response
  25.     {
  26.         return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/_header.html.twig', [
  27.             "menu"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["isMainMenu"=>true])),
  28.         ]);
  29.     }
  30.     #[Route('/{_locale}/footer'name'front_footer')]
  31.     public function footer(
  32.         MenuRepository $menuRepository,
  33.         ServiceFlexyFrontProvider $flexyFrontProvider
  34.         
  35.         ): Response
  36.     {
  37.         return $this->render('@Flexy/FrontBundle/Themes/IlaveU/templates/_footer.html.twig', [
  38.             "menuLinks"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["name"=>"Liens utiles"])),
  39.             "menuServices"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["name"=>"Services"])),
  40.             "menuBottom"=>$flexyFrontProvider->getRendredMenu($menuRepository->findOneBy(["name"=>"Conditions de vente"])),
  41.         ]);
  42.     }
  43. }