MenuItemManager
class MenuItemManager implements BasicEntityManagerInterface
Class MenuItemManager is injected as alligator.menu_item_manager service. MenuItemManager handles the logic for managed entity.
Constants
| MENU_ITEMS_TREE |
|
Methods
MenuItemManager constructor.
Find all menu items for provided locale
Remove menu link that match provided id, set replacement link if exist and dispatch event for re-caching
No description
Find all images used in menu items
Find all menu items that match provide parameters
Find all menu items as html
Generate route for provided route name and parameters
Retrieve cached menu item tree html for provided locale
Retrieve cached responsive menu item tree html for provided locale
Set menu item tree html to cache for provided locale
Set responsive menu item tree html to cache for provided locale
No description
No description
No description
No description
Find all menu items that match provided locale
Details
at line 54
__construct(MenuItemRepository $itemRepository, EventDispatcherInterface $dispatcher, ContainerInterface $container)
MenuItemManager constructor.
at line 70
MenuItem
saveItem(MenuItem $menuItem)
Persist new menu item as last child of ROOT node, and dispatch event for re-caching
at line 85
MenuItem
changeNested(stdClass $menuItem)
Update existing menu item, and dispatch event for re-caching
at line 99
array
getAll(string $locale)
Find all menu items for provided locale
at line 112
mixed
removeNestedFromTree(int $id)
Remove menu link that match provided id, set replacement link if exist and dispatch event for re-caching
at line 127
mixed
getMenuLinks()
at line 140
mixed
getMenuItemImages()
Find all images used in menu items
at line 164
array
getMenuItemsByParams(array $params)
Find all menu items that match provide parameters
at line 191
array|string
getAllMenuTree(array $options, string $locale)
Find all menu items as html
at line 208
string
getRouteForNode(MenuItem|array $node, string $locale)
Generate route for node
at line 238
string
generateRoute(string $routeName, array $data)
Generate route for provided route name and parameters
at line 253
string
getCashMenuTree(string|null $locale = null)
Retrieve cached menu item tree html for provided locale
at line 266
string
getResponsiveCashMenuTree(string|null $locale = null)
Retrieve cached responsive menu item tree html for provided locale
at line 280
string
setCashMenuTree(mixed $data, string|null $locale = null)
Set menu item tree html to cache for provided locale
at line 294
mixed
setResponsiveCashMenuTree(mixed $data, string|null $locale = null)
Set responsive menu item tree html to cache for provided locale
at line 304
string
getDefaultLocale()
at line 312
array
getAvailableLanguages()
at line 321
dispatchMenuTreeDecoratorEvent(MenuItem|null $menuItem = null, string|null $locale = null)
at line 335
Event
dispatchMenuDecoratorOptionsEvent(string|null $locale = null)
at line 346
array
getAllFirstLevelItems(string $locale)
Find all menu items that match provided locale