You are here

function nodehierarchy_menu_node_save in Node Hierarchy 7.4

Do the actual insertion or update.

2 calls to nodehierarchy_menu_node_save()
nodehierarchy_menu_node_insert in nodehierarchy_menu/nodehierarchy_menu.module
Implements hook_node_insert().
nodehierarchy_menu_node_update in nodehierarchy_menu/nodehierarchy_menu.module
Implements hook_node_update().

File

nodehierarchy_menu/nodehierarchy_menu.module, line 208
Create menu items for a node based on the Node Hierarchy.

Code

function nodehierarchy_menu_node_save($node) {
  if (isset($node->nodehierarchy_parents)) {
    foreach ($node->nodehierarchy_parents as $parent) {
      if (isset($parent->menu_link)) {
        _nodehierarcny_menu_save_node_menu_link($parent->menu_link, $node, $parent);
      }
    }
  }
}