public function CheeseburgerMenuBlock::createMenuItemHooks in Cheeseburger Menu 5.0.x
Invokes hooks on given menu items and its children.
Parameters
\Drupal\cheeseburger_menu\CheeseburgerMenuItem[] $menu_items: Menu items to invoke hooks on.
1 call to CheeseburgerMenuBlock::createMenuItemHooks()
- CheeseburgerMenuBlock::createHooks in src/
Plugin/ Block/ CheeseburgerMenuBlock.php - Invokes all hooks provided by cheeseburger_menu module.
File
- src/
Plugin/ Block/ CheeseburgerMenuBlock.php, line 396
Class
- CheeseburgerMenuBlock
- Provides a 'CheeseburgerMenu' block.
Namespace
Drupal\cheeseburger_menu\Plugin\BlockCode
public function createMenuItemHooks(array $menu_items) {
foreach ($menu_items as $menu_item) {
if ($menu_item
->hasChild()) {
$this
->createMenuItemHooks($menu_item
->getChildren());
}
$this->moduleHandler
->alter('cheeseburger_menu_item', $menu_item);
}
}