Created
December 2, 2017 11:08
-
-
Save VictorFursa/2770a32fc689c8b661a53fc9821459a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$menu = $this->container->get('chain.menu.item.provider'); | |
$menu->addMenu(new SidebarMenu(), 'sidebar'); // это же не правильно? но ано работает :( | |
$menu->addMenu(new FooterMenu(), 'footer'); | |
$menu->getMenu('sidebar')->getMenuItems(); | |
$menu->getMenu('footer')->getMenuItems(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
_defaults: | |
autowire: true | |
autoconfigure: true | |
public: true | |
sidebar.menu: | |
class: SadiSamBundle\Service\SidebarMenu | |
tags: | |
- { name: menu.provider, menuName: sidebar } | |
chain.menu.item.provider: | |
class: SadiSamBundle\DependencyInjection\ChainMenuItemProvider | |
arguments: [!tagged menu.provider] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment