function nodehierarchy_nodeapi in Node Hierarchy 5
Same name and namespace in other branches
- 6.3 nodehierarchy.module \nodehierarchy_nodeapi()
- 6 nodehierarchy.module \nodehierarchy_nodeapi()
- 6.2 nodehierarchy.module \nodehierarchy_nodeapi()
Implementation of hook_nodeapi().
File
- ./
nodehierarchy.module, line 232 - A module to make nodes hierarchical.
Code
function nodehierarchy_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
switch ($op) {
case 'fields':
return;
case 'insert':
case 'update':
nodehierarchy_invoke_api("update_parent", $node);
break;
case 'load':
return nodehierarchy_load_node($node);
break;
case 'delete':
nodehierarchy_delete_node($node);
break;
case 'validate':
break;
case 'view':
if ($page && !$teaser) {
nodehierarchy_set_breadcrumbs($node);
}
break;
}
}