node_invoke

Versions
4.6 – 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.

▾ 26 functions call node_invoke()

block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.
blogapi_settings in modules/blogapi.module
book_print in modules/book.module
Menu callback; generates printer-friendly book page with all descendants.
book_print_recurse in modules/book.module
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_add in modules/node.module
Present a node submission form or a set of links to such forms.
node_admin_nodes in modules/node.module
Generate the content administration overview.
node_delete in modules/node.module
Ask for confirmation, and delete the node.
node_feed in modules/node.module
A generic function for generating RSS feeds from a set of nodes.
node_help in modules/node.module
Implementation of hook_help().
node_load in modules/node.module
Load a node object from the database.
node_menu in modules/node.module
Implementation of hook_menu().
node_preview in modules/node.module
Generate a node preview, including a form for further edits.
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
Accepts a submission of new or changed node content.
node_types_configure in modules/node.module
Menu callback; presents each node type configuration page.
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.
queue_overview in modules/queue.module
Display a page listing the nodes in the submission queue.
system_theme_settings in modules/system.module
Menu callback; display theme configuration for entire site and individual themes.
taxonomy_form_vocabulary in modules/taxonomy.module
taxonomy_overview in modules/taxonomy.module
Generate a tabular listing of administrative functions for vocabularies.
tracker_page in modules/tracker.module
Menu callback. Prints a listing of active nodes on the site.

Code

modules/node.module, line 292

<?php
function node_invoke(&$node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) {
  $function = node_get_module_name($node) ."_$hook";

  if (function_exists($function)) {
    return ($function($node, $a2, $a3, $a4));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.