node_invoke_nodeapi

Versions
4.6 – 6
node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL)

Invoke a hook_nodeapi() operation in all modules.

Parameters

&$node A node object.

$op A string containing the name of the nodeapi operation.

$a3, $a4 Arguments to pass on to the hook, after the $node and $op arguments.

Return value

The returned value of the invoked hooks.

▾ 14 functions call node_invoke_nodeapi()

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_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_form in modules/node.module
Generate the node editing form.
node_load in modules/node.module
Load a node object from the database.
node_save in modules/node.module
Save a node object into the database.
node_search in modules/node.module
Implementation of hook_search().
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.

Code

modules/node.module, line 312

<?php
function node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  $return = array();
  foreach (module_list() as $name) {
    $function = $name .'_nodeapi';
    if (function_exists($function)) {
      $result = $function($node, $op, $a3, $a4);
      if (is_array($result)) {
        $return = array_merge($return, $result);
      }
      else if (isset($result)) {
        $return[] = $result;
      }
    }
  }
  return $return;
}
?>
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.