function node_invoke
7.x node.module | node_invoke($node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) |
6.x node.module | node_invoke(&$node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) |
Invoke a node hook.
Parameters
&$node: Either a node object, node array, 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.
9 calls to node_invoke()
- hook_update_index in documentation-6.x/
developer/ hooks/ core.php - Update Drupal's full-text index for this module.
- node_build_content in drupal-6.x/
modules/ node/ node.module - Builds a structured array representing the node's content.
- node_delete in drupal-6.x/
modules/ node/ node.module - Delete a node.
- node_feed in drupal-6.x/
modules/ node/ node.module - A generic function for generating RSS feeds from a set of nodes.
- node_form in drupal-6.x/
modules/ node/ node.pages.inc - Generate the node add/edit form array.
File
- drupal-6.x/
modules/ node/ node.module, line 658 - 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)) {
$module = node_get_types('module', $node);
if ($module == 'node') {
$module = 'node_content'; // Avoid function name collisions.
}
$function = $module . '_' . $hook;
return ($function($node, $a2, $a3, $a4));
}
}