You are here

function menu_breadcrumb_menu_list in Menu Breadcrumb 7

Same name and namespace in other branches
  1. 6 menu_breadcrumb.module \menu_breadcrumb_menu_list()

Get the menu/selection list.

Return value

array An array indicating the enabled status of each menu.

1 call to menu_breadcrumb_menu_list()
menu_breadcrumb_init in ./menu_breadcrumb.module
Implements hook_init().

File

./menu_breadcrumb.module, line 276
The main file for the menu_breadcrumb module.

Code

function menu_breadcrumb_menu_list() {
  static $list;
  if (!isset($list)) {
    $menus = _menu_breadcrumb_get_menus();
    unset($menus['menu_breadcrumb_default_menu']);
    $list = array();
    foreach ($menus as $name => $menu) {
      $list[$name] = (bool) $menu['enabled'];
    }

    // Enable other modules to dynamically modify the menu list
    // (for example, to make the order depend upon the current
    // user's language preference).
    if ($hook = module_invoke_all('menu_breadcrumb_menu_list', $list)) {
      $list = $hook;
    }
  }
  return $list;
}