function node_invoke
Invokes a node hook.
Parameters
$node: A node object or a string containing the node type.
$hook: A string containing the name of the hook.
$a2, $a3, $a4: Arguments to pass on to the hook, after the $node argument.
Return value
The returned value of the invoked hook.
4 calls to node_invoke()
- node_build_content in modules/node/ node.module 
- Builds a structured array representing the node's content.
- node_delete_multiple in modules/node/ node.module 
- Deletes multiple nodes.
- node_object_prepare in modules/node/ node.module 
- Prepares a node object for editing.
- node_save in modules/node/ node.module 
- Saves changes to a node or adds a new node.
File
- 
              modules/node/ node.module, line 912 
Code
function node_invoke($node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) {
  if (node_hook($node, $hook)) {
    $base = node_type_get_base($node);
    $function = $base . '_' . $hook;
    return $function($node, $a2, $a3, $a4);
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
