node_invoke

  1. drupal
    1. 4.7
    2. 5 node.module
    3. 6 node.module
    4. 7 node.module
Versions
4.7 – 6 node_invoke(&$node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL)
7 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.

▾ 14 functions call node_invoke()

book_node_visitor_html_pre in modules/book.module
Generates printer-friendly HTML for a node. This function is a 'pre-node' visitor function for book_recurse().
hook_search in developer/hooks/core.php
Define a custom search routine.
hook_update_index in developer/hooks/core.php
Update Drupal's full-text index for this module.
node_delete in modules/node.module
Delete a node.
node_feed in modules/node.module
A generic function for generating RSS feeds from a set of nodes.
node_form_array in modules/node.module
Generate the node editing form array.
node_load in modules/node.module
Load a node object from the database.
node_object_prepare in modules/node.module
node_save in modules/node.module
Save a node object into the database.
node_search in modules/node.module
Implementation of hook_search().
node_submit in modules/node.module
Prepare node for save and allow modules to make changes.
node_update_index in modules/node.module
Implementation of hook_update_index().
node_validate in modules/node.module
Perform validation checks on the given node.
node_view in modules/node.module
Generate a display of the given node.

Code

modules/node.module, line 309

<?php
function node_invoke(&$node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) {
  if (node_hook($node, $hook)) {
    $function = node_get_base($node) . "_$hook";
    return ($function($node, $a2, $a3, $a4));
  }
}
?>