You are here

function node_load_activity_context in Activity 6.2

Load up the context array to pass to activity_record.

Parameters

string $hook: The hook that is being fired.

string $op: The op for that hook.

string $id: The id for the action.

Return value

array The context array for activity_record.

See also

trigger_nodeapi

1 string reference to 'node_load_activity_context'
node_activity_info in ./activity.module

File

modules/node.activity.inc, line 128
Activity definition file for node.module

Code

function node_load_activity_context($hook, $op, $id) {
  $node = node_load($id);
  $context = array();
  if (!empty($node)) {
    $context = array(
      'hook' => $hook,
      'op' => $op,
      'node' => $node,
    );
  }
  return $context;
}