You are here

function og_menu_single_children_items in OG Menu Single 7

Fetches all children of a given parent link.

Parameters

$mlid: Parent link ID to build a tree of menu links below.

$max_depth: The maxium depth of the tree to fetch, defaults to menu's max depth.

Return value

An array of menu links and their children (as determined by depth).

6 calls to og_menu_single_children_items()
og_menu_single_block_view in ./og_menu_single.module
Implements hook_block_view().
og_menu_single_form_menu_edit_item_alter in ./og_menu_single.module
Implements hook_form_FORMID_alter().
og_menu_single_form_node_form_alter in ./og_menu_single.module
Implements hook_form_FORMID_alter().
og_menu_single_menu_edit_form in ./og_menu_single.admin.inc
OG variables edit variable form.
og_menu_single_pane_edit_form in plugins/content_types/og_menu_single_menu.inc
Custom edit form to allow users to enable/disable selectable content types

... See full list

File

./og_menu_single.module, line 470
Creates a single menu per organic group on a site.

Code

function og_menu_single_children_items($plid, $max_depth = NULL) {
  if (!isset($max_depth)) {
    $max_depth = MENU_MAX_DEPTH - 1;
  }
  $menu_link = og_menu_single_menu_link_load($plid);
  return _og_menu_single_children_items($plid, $menu_link['depth'] + 1, $max_depth + 1);
}