You are here

function menu_node_node_load in Menu Node API 7

Implements hook_node_load().

File

./menu_node.module, line 54
Menu Node API Manages relationships between the {node} and {menu_links} table.

Code

function menu_node_node_load($nodes, $types) {
  if (!is_array($nodes)) {
    return;
  }

  // TODO: Optimize for multiple nodes.
  foreach ($nodes as $node) {

    // Ensure the menu object is loaded.
    $node->menu_node_links = menu_node_get_links($node->nid);
  }
}