function tb_megamenu_theme in The Better Mega Menu 2.x
Same name and namespace in other branches
- 8 tb_megamenu.module \tb_megamenu_theme()
- 7 tb_megamenu.module \tb_megamenu_theme()
Implements hook_theme().
File
- ./
tb_megamenu.module, line 45 - TB Mega Menu.
Code
function tb_megamenu_theme($existing, $type, $theme, $path) {
$items['tb_megamenu'] = [
'variables' => [
'menu_name' => NULL,
'content' => NULL,
'section' => 'frontend',
'block_theme' => \Drupal::config('system.theme')
->get('default'),
],
];
$items['tb_megamenu_nav'] = [
'variables' => [
'menu_name' => NULL,
'level' => NULL,
'items' => NULL,
'menu_config' => NULL,
'block_config' => NULL,
'trail' => NULL,
'section' => 'frontend',
],
];
$items['tb_megamenu_item'] = [
'variables' => [
'menu_name' => NULL,
'item' => NULL,
'level' => NULL,
'menu_config' => NULL,
'block_config' => NULL,
'trail' => NULL,
'submenu' => NULL,
'section' => 'frontend',
],
];
$items['tb_megamenu_submenu'] = [
'variables' => [
'menu_name' => NULL,
'parent' => NULL,
'level' => NULL,
'menu_config' => NULL,
'block_config' => NULL,
'trail' => NULL,
'section' => 'frontend',
],
];
$items['tb_megamenu_row'] = [
'variables' => [
'menu_name' => NULL,
'row' => NULL,
'parent' => NULL,
'level' => NULL,
'menu_config' => NULL,
'block_config' => NULL,
'trail' => NULL,
'section' => 'frontend',
],
];
$items['tb_megamenu_column'] = [
'variables' => [
'menu_name' => NULL,
'col' => NULL,
'parent' => NULL,
'level' => NULL,
'menu_config' => NULL,
'block_config' => NULL,
'trail' => NULL,
'section' => 'frontend',
],
];
$items['tb_megamenu_block'] = [
'variables' => [
'block_id' => NULL,
'section' => 'frontend',
'showblocktitle' => 1,
],
];
$items['tb_megamenu_subnav'] = [
'variables' => [
'menu_name' => NULL,
'col' => NULL,
'level' => NULL,
'items' => NULL,
'menu_config' => NULL,
'block_config' => NULL,
'trail' => NULL,
'section' => 'frontend',
],
];
$items['tb_megamenu_admin_settings'] = [
'render element' => 'form',
];
$items['tb_megamenu_backend'] = [
'variables' => [
'blocks' => NULL,
'menu_name' => NULL,
'block_theme' => \Drupal::config('system.theme')
->get('default'),
'menu_content' => NULL,
],
'path' => $path . '/templates/backend',
];
$items['tb_megamenu_item_toolbox'] = [
'variables' => [],
'path' => $path . '/templates/backend',
];
$items['tb_megamenu_submenu_toolbox'] = [
'variables' => [],
'path' => $path . '/templates/backend',
];
$items['tb_megamenu_column_toolbox'] = [
'variables' => [
'blocks_options' => [],
],
'path' => $path . '/templates/backend',
];
return $items;
}