You are here

function nodehierarchy_invoke_api in Node Hierarchy 6

Same name and namespace in other branches
  1. 5 nodehierarchy.module \nodehierarchy_invoke_api()

Invoke a hook_nodehierarchyapi() operation in all modules.

Parameters

&$node: A node object.

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

Return value

The returned value of the invoked hooks.

5 calls to nodehierarchy_invoke_api()
nodehierarchy_form_alter in ./nodehierarchy.module
Implementation of hooks_form_alter().
nodehierarchy_insert_node in ./nodehierarchy.module
Insert or update a node. Set it's parent
nodehierarchy_nodeapi in ./nodehierarchy.module
Implmentation of hook_nodeapi().
nodehierarchy_nodehierarchyapi in ./nodehierarchy.module
Implementation of hook_nodehierarchyapi(). Responds to own api calls.
_nodehierarchy_get_node_type_settings_form in ./nodehierarchy.module
Get the nodehierarchy setting form for a particular node type.

File

./nodehierarchy.module, line 512

Code

function nodehierarchy_invoke_api($op, &$node) {
  $return = array();
  foreach (module_implements('nodehierarchyapi') as $name) {
    $function = $name . '_nodehierarchyapi';
    $result = $function($op, $node);
    if (isset($result) && is_array($result)) {
      $return = array_merge($return, $result);
    }
    elseif (isset($result)) {
      $return[] = $result;
    }
  }
  return $return;
}