You are here

function theme_admin_menu_tree in Administration menu 5.3

Same name and namespace in other branches
  1. 5 admin_menu.inc \theme_admin_menu_tree()
  2. 5.2 admin_menu.module \theme_admin_menu_tree()

Return a rendered menu tree.

Parameters

$pid: The menu item id to use for the administration menu.

Return value

string The complete, rendered administration menu.

1 call to theme_admin_menu_tree()
admin_menu_output in ./admin_menu.module
Build the administration menu output.

File

./admin_menu.module, line 411
Render an administrative menu as a dropdown menu at the top of the window.

Code

function theme_admin_menu_tree($pid = 5) {
  $_admin_menu = admin_menu_get_menu();
  $output = '';
  if (!empty($_admin_menu[$pid]['children'])) {
    foreach ($_admin_menu[$pid]['children'] as $mid) {
      $output .= theme_admin_menu_item($mid, theme_admin_menu_tree($mid), empty($_admin_menu[$mid]['children']));
    }
  }
  return $output ? "\n<ul>" . $output . '</ul>' : '';
}