You are here

function responsive_menu_tree_build in Responsive and off-canvas menu 7

Same name and namespace in other branches
  1. 7.3 includes/responsive_menu.menu.inc \responsive_menu_tree_build()
  2. 7.2 includes/responsive_menu.menu.inc \responsive_menu_tree_build()

Build a menu tree based.

1 call to responsive_menu_tree_build()
responsive_menu_block_view in ./responsive_menu.module
Implements hook_block_view().

File

includes/responsive_menu.menu.inc, line 11
Functions which process the menu.

Code

function responsive_menu_tree_build($menu_name) {

  // Get the raw menu tree data.
  $tree = responsive_menu_tree_block_data($menu_name);
  $data = array();
  $data['subject'] = '';
  $data['content']['#content'] = responsive_menu_tree_output($tree, $menu_name);
  if (!empty($data['content']['#content'])) {
    $data['content']['#theme'] = array(
      'responsive_menu_block_wrapper',
    );
    $data['content']['#menu_name'] = $menu_name;
  }
  else {
    $data['content'] = '';
  }
  return $data;
}