_menu_node_tree(&$tree, $menu, $data, $parents, $marker = NULL, $spacer = NULL)A private recursive sort function.
Given a menu tree, return its child node items.
$tree The recursive tree data.
$menu The menu that this data belongs to.
$data The tree data for this menu element.
$parents An array of menu link ids indicating the tree elements to return.
$marker A string (or NULL) to prepend to the menu link title, indicating relative depth.
$spacer A string (or NULL) to place between the marker and the title.
No return. Modify $tree by reference.
./menu_node.module, line 180
<?php
function _menu_node_tree(&$tree, $menu, $data, $parents, $marker = NULL, $spacer = NULL) {
if (empty($tree)) {
$tree = array();
}
if (empty($parents)) {
$parents = array();
}
if (in_array($data['link']['mlid'], $parents)) {
$parent = menu_node_get_parent($data['link']);
$tree[$parent][$data['link']['mlid']] = str_repeat($marker, $data['link']['depth']) . $spacer . $data['link']['title'] . ' ';
}
if (!empty($data['below'])) {
// Recursive processing joy!
foreach ($data['below'] as $value) {
_menu_node_tree($tree, $menu, $value, $parents, $marker, $spacer);
}
}
}
?>