function node_invoke in Drupal 7
Same name and namespace in other branches
- 4 modules/node.module \node_invoke()
- 5 modules/node/node.module \node_invoke()
- 6 modules/node/node.module \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 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
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);
}
}