public function SimpleMenuBlock::_build_sub_menu_menuparent in Simple Mobile Menu 8
// add 'menuparent' class.
Parameters
$items:
Return value
mixed
1 call to SimpleMenuBlock::_build_sub_menu_menuparent()
- SimpleMenuBlock::_build_menu_style in src/
Plugin/ Block/ SimpleMenuBlock.php - add class to smm menus.
File
- src/
Plugin/ Block/ SimpleMenuBlock.php, line 56
Class
- SimpleMenuBlock
- Provides a Simple Mobile Menu block.
Namespace
Drupal\simple_mobile_menu\Plugin\BlockCode
public function _build_sub_menu_menuparent($items) {
foreach ($items as $k => &$item) {
if ($item['below']) {
$item['attributes']
->addClass('has-child');
$item['below'] = $this
->_build_sub_menu_menuparent($item['below']);
}
}
return $items;
}