function _nodehierarchy_create_nodehierarchy_menu_link_reference in Node Hierarchy 7.2
Same name and namespace in other branches
- 6.3 nodehierarchy.module \_nodehierarchy_create_nodehierarchy_menu_link_reference()
- 6.2 nodehierarchy.module \_nodehierarchy_create_nodehierarchy_menu_link_reference()
Create a link from the node to its menu item.
This pivot table can be used for more efficiently joining to the menu links table for views integration.
2 calls to _nodehierarchy_create_nodehierarchy_menu_link_reference()
- nodehierarchy_update_6200 in ./
nodehierarchy.install - Update from the 5.x or 6.x-1.x branches.
- _nodehierarchy_save_menu_link in ./
nodehierarchy.module - Save a menu link with changes if needed.
File
- ./
nodehierarchy.module, line 1193 - A module to make nodes hierarchical.
Code
function _nodehierarchy_create_nodehierarchy_menu_link_reference($menu_link) {
if (!db_query("SELECT mlid FROM {nodehierarchy_menu_links} WHERE mlid = :mlid", array(
':mlid' => $menu_link['mlid'],
))
->fetchField()) {
drupal_write_record('nodehierarchy_menu_links', $menu_link);
}
}