function menu_tree_collect_node_links

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 menu.inc menu_tree_collect_node_links(&$tree, &$node_links)
cle7 menu.inc menu_tree_collect_node_links(&$tree, &$node_links)
elmsmedia7 menu.inc menu_tree_collect_node_links(&$tree, &$node_links)
icor7 menu.inc menu_tree_collect_node_links(&$tree, &$node_links)
meedjum_blog7 menu.inc menu_tree_collect_node_links(&$tree, &$node_links)
mooc7 menu.inc menu_tree_collect_node_links(&$tree, &$node_links)

Collects node links from a given menu tree recursively.

Parameters

$tree: The menu tree you wish to collect node links from.

$node_links: An array in which to store the collected node links.

Related topics

3 calls to menu_tree_collect_node_links()
book_menu_subtree_data in modules/book/book.module
Gets the data representing a subtree of the book hierarchy.
menu_overview_form in modules/menu/menu.admin.inc
Form for editing an entire menu tree at once.
_menu_build_tree in includes/menu.inc
Builds a menu tree.

File

includes/menu.inc, line 1463
API for the Drupal menu system.

Code

function menu_tree_collect_node_links(&$tree, &$node_links) {
  foreach ($tree as $key => $v) {
    if ($tree[$key]['link']['router_path'] == 'node/%') {
      $nid = substr($tree[$key]['link']['link_path'], 5);
      if (is_numeric($nid)) {
        $node_links[$nid][$tree[$key]['link']['mlid']] = &$tree[$key]['link'];
        $tree[$key]['link']['access'] = FALSE;
      }
    }
    if ($tree[$key]['below']) {
      menu_tree_collect_node_links($tree[$key]['below'], $node_links);
    }
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.