public function NiceMenusBlock::_build_sub_menu_menuparent in Nice Menus 8
// add 'menuparent' class.
Parameters
$items:
Return value
mixed
1 call to NiceMenusBlock::_build_sub_menu_menuparent()
- NiceMenusBlock::_build_menu_style in src/
Plugin/ Block/ NiceMenusBlock.php - add class to nice menus.
File
- src/
Plugin/ Block/ NiceMenusBlock.php, line 137
Class
- NiceMenusBlock
- Provides a 'Nice menus' block.
Namespace
Drupal\nice_menus\Plugin\BlockCode
public function _build_sub_menu_menuparent($items) {
foreach ($items as $k => &$item) {
if ($item['below']) {
$item['attributes']
->addClass('menuparent');
$item['below'] = $this
->_build_sub_menu_menuparent($item['below']);
}
}
return $items;
}