MenuItemRepository
class MenuItemRepository extends NestedTreeRepository
Class MenuItemRepository is injected as alligator.menu_item_repository service. MenuItemRepository is used for crud operation for entity.
Use this class to work with database.
Constants
| ALIAS |
Alias for entity |
Methods
Find all menu items for provided locale
Find all images used in menu items
Remove menu link that match provided id
Find replacement path for menu item that match provided id
Build menu tree
Find slug based on entity from menu link
Find all menu items that match provided locale
Details
at line 76
array
getAll(string $locale)
Find all menu items for provided locale
at line 100
array
findAllImagesForItems()
Find all images used in menu items
at line 168
string|bool
removeNestedFromTree(int $id)
Remove menu link that match provided id
at line 192
mixed
getReplacementPathForMenuItem(int $id)
Find replacement path for menu item that match provided id
at line 208
array|string
getMenuTree(array $options, string $locale)
Build menu tree
at line 233
string|null
getSlugForEntity(array $node)
Find slug based on entity from menu link
at line 249
null
getSlugForEntityForMenuItem(MenuItem $node)
Find slug based on entity from menu link
at line 282
array
getAllFirstLevelItems(string $locale)
Find all menu items that match provided locale