You are here

function tb_megamenu_theme in The Better Mega Menu 7

Same name and namespace in other branches
  1. 8 tb_megamenu.module \tb_megamenu_theme()
  2. 2.x tb_megamenu.module \tb_megamenu_theme()

Implements hook_theme().

Parameters

array $existing:

string $type:

string $theme:

string $path:

Return value

array

File

./tb_megamenu.module, line 110

Code

function tb_megamenu_theme($existing, $type, $theme, $path) {
  $items = array();
  $items['tb_megamenu'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'content' => NULL,
      'section' => 'frontend',
    ),
    'template' => 'tb-megamenu',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu',
    ),
  );
  $items['tb_megamenu_nav'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'level' => NULL,
      'items' => NULL,
      'menu_config' => NULL,
      'block_config' => NULL,
      'trail' => NULL,
      'section' => 'frontend',
    ),
    'template' => 'tb-megamenu-nav',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_nav',
    ),
  );
  $items['tb_megamenu_item'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'a_classes' => array(),
      'item' => NULL,
      'level' => NULL,
      'menu_config' => NULL,
      'block_config' => NULL,
      'trail' => NULL,
      'submenu' => NULL,
      'section' => 'frontend',
    ),
    'template' => 'tb-megamenu-item',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_item',
    ),
  );
  $items['tb_megamenu_submenu'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'parent' => NULL,
      'level' => NULL,
      'menu_config' => NULL,
      'block_config' => NULL,
      'trail' => NULL,
      'section' => 'frontend',
    ),
    'template' => 'tb-megamenu-submenu',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_submenu',
    ),
  );
  $items['tb_megamenu_row'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'row' => NULL,
      'parent' => NULL,
      'level' => NULL,
      'menu_config' => NULL,
      'block_config' => NULL,
      'trail' => NULL,
      'section' => 'frontend',
    ),
    'template' => 'tb-megamenu-row',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_row',
    ),
  );
  $items['tb_megamenu_column'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'col' => NULL,
      'parent' => NULL,
      'level' => NULL,
      'menu_config' => NULL,
      'block_config' => NULL,
      'trail' => NULL,
      'section' => 'frontend',
    ),
    'template' => 'tb-megamenu-column',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_column',
    ),
  );
  $items['tb_megamenu_subnav'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'col' => NULL,
      'level' => NULL,
      'items' => NULL,
      'menu_config' => NULL,
      'block_config' => NULL,
      'trail' => NULL,
      'section' => 'frontend',
    ),
    'template' => 'tb-megamenu-subnav',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_subnav',
    ),
  );
  $items['tb_megamenu_block'] = array(
    'variables' => array(
      'menu_name' => NULL,
      'block_key' => NULL,
      'section' => 'frontend',
      'showblocktitle' => 1,
    ),
    'template' => 'tb-megamenu-block',
    'path' => $path . '/templates',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_block',
    ),
  );
  $items['tb_megamenu_admin_settings'] = array(
    'render element' => 'form',
  );
  $items['tb_megamenu_backend'] = array(
    'variables' => array(
      'blocks' => NULL,
      'menu_name' => NULL,
      'menu_content' => NULL,
    ),
    'template' => 'tb-megamenu-backend',
    'path' => $path . '/templates/backend',
    'preprocess functions' => array(
      'template_preprocess',
      'template_preprocess_tb_megamenu_backend',
    ),
  );
  return $items;
}