public static function WeMegaMenuBuilder::createNewMegamenuItem in Drupal Mega Menu 8.x
Same name and namespace in other branches
- 8 src/WeMegaMenuBuilder.php \Drupal\we_megamenu\WeMegaMenuBuilder::createNewMegamenuItem()
1 call to WeMegaMenuBuilder::createNewMegamenuItem()
File
- src/
WeMegaMenuBuilder.php, line 798
Class
Namespace
Drupal\we_megamenuCode
public static function createNewMegamenuItem($level, $derivativeId, $item) {
$rows_content = [];
$submenu_config = new \stdClass();
$submenu_config->width = '';
$submenu_config->class = '';
$submenu_config->type = '';
$item_config = new \stdClass();
$item_config->level = $level;
$item_config->type = 'we-mega-menu-li';
$item_config->id = $derivativeId;
$item_config->title = $item['title'];
$item_config->submenu = 0;
$item_config->hide_sub_when_collapse = '';
$item_config->group = 0;
$item_config->class = '';
$item_config->{'data-icon'} = '';
$item_config->{'data-caption'} = '';
$item_config->{'data-alignsub'} = '';
$item_config->{'data-target'} = '';
$new_item = new \stdClass();
$new_item->rows_content = $rows_content;
$new_item->submenu_config = $submenu_config;
$new_item->item_config = $item_config;
return $new_item;
}