public function RenderCheeseburgerMenuBlock::getAllMenuLinkId in Cheeseburger Menu 8.2
Same name and namespace in other branches
- 8 src/Controller/renderCheeseburgerMenuBlock.php \Drupal\cheeseburger_menu\Controller\renderCheeseburgerMenuBlock::getAllMenuLinkId()
- 8.3 src/Controller/RenderCheeseburgerMenuBlock.php \Drupal\cheeseburger_menu\Controller\RenderCheeseburgerMenuBlock::getAllMenuLinkId()
Get all menu link ids.
1 call to RenderCheeseburgerMenuBlock::getAllMenuLinkId()
- RenderCheeseburgerMenuBlock::renderTree in src/
Controller/ RenderCheeseburgerMenuBlock.php - Render given tree.
File
- src/
Controller/ RenderCheeseburgerMenuBlock.php, line 630 - Controller used for rendering block.
Class
- RenderCheeseburgerMenuBlock
- Class RenderCheeseburgerMenuBlock.
Namespace
Drupal\cheeseburger_menu\ControllerCode
public function getAllMenuLinkId() {
$all_menus = Menu::loadMultiple();
$menus = [];
foreach ($all_menus as $id => $menu) {
$menus[$menu
->label()] = $id;
}
asort($menus);
return $menus;
}