src/Controller/MenuController.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Pimcore\Controller\FrontendController;
  4. use Pimcore\Model\DataObject\Menu;
  5. use Pimcore\Model\DataObject\MenuNode;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\HttpFoundation\Response;
  8. class MenuController extends FrontendController
  9. {
  10.     public function headerAction()
  11.     {
  12.         $menu \Pimcore\Model\WebsiteSetting::getByName('MENU_HEADER');
  13.         $currentPagePath Request::createFromGlobals()->getPathInfo();
  14.         return $this->render('snippets/menu-header.html.twig', [
  15.             'menu' => $menu,
  16.             'currentPagePath' => $currentPagePath
  17.         ]);
  18.     }
  19.     public function breadcrumbsAction()
  20.     {
  21.         $menu \Pimcore\Model\WebsiteSetting::getByName('MENU_HEADER');
  22.         $currentPagePath Request::createFromGlobals()->getPathInfo();
  23.         return $this->render('snippets/breadcrumbs.html.twig', [
  24.             'menu' => $menu,
  25.             'currentPagePath' => $currentPagePath
  26.         ]);
  27.     }
  28.     public function footerAction()
  29.     {
  30.         $menu \Pimcore\Model\WebsiteSetting::getByName('MENU_FOOTER');
  31.         return $this->render('snippets/menu-footer.html.twig', [
  32.             'menu' => $menu
  33.         ]);
  34.     }
  35. }