MenuBuilderExtension
class MenuBuilderExtension extends Twig_Extension
Class MenuBuilderExtension is injected as empire_menu_builder_extension service. MenuBuilderExtension handles the logic and provides necessary data for managed entity in twig.
Properties
| protected MenuItemManager | $manager | ||
| protected ArrayCollection | $relationshipNames |
Methods
getFunctions()
{@inheritdoc}
array
getFirstLevelMenuItems(string $locale)
Find all menu items that match provided locale
string
getTreeMenu(bool $useFromCache, string $locale)
Retrieve cached menu tree html. Set to cache if it is missing
string
getResponsiveTreeMenu(bool $useFromCache, string $locale)
No description
mixed
setResponsiveMenuTreeToCache(string|null $locale = null, bool $useFromCache = true)
Set to cache responsive menu tree html
setMenuTreeToCache(string|null $locale = null, bool $useFromCache = true)
Set to cache menu tree html
string
getName()
Returns the name of the extension.
Details
at line 51
__construct(MenuItemManager $manager)
MenuBuilderExtension constructor.
at line 59
getFunctions()
{@inheritdoc}
at line 76
array
getFirstLevelMenuItems(string $locale)
Find all menu items that match provided locale
at line 89
string
getTreeMenu(bool $useFromCache, string $locale)
Retrieve cached menu tree html. Set to cache if it is missing
at line 104
string
getResponsiveTreeMenu(bool $useFromCache, string $locale)
at line 119
mixed
getRouteForNode(MenuItem $node, string $locale)
at line 131
setResponsiveMenuTreeToCache(string|null $locale = null, bool $useFromCache = true)
Set to cache responsive menu tree html
at line 239
setMenuTreeToCache(string|null $locale = null, bool $useFromCache = true)
Set to cache menu tree html
at line 315
string
getName()
Returns the name of the extension.