You are here

function activity_invoke_activityapi in Activity 6

Same name and namespace in other branches
  1. 5.4 activity.module \activity_invoke_activityapi()
  2. 5.3 activity.module \activity_invoke_activityapi()

Invoke a hook_activityapi() operation in all modules.

Parameters

&$activity: An activity array.

$op: A string containing the name of the nodeapi operation. 'insert' is called when a new activity is created 'load' is called when an activity is loaded 'render' is called before token replacement begins

Return value

The returned value of the invoked hooks.

5 calls to activity_invoke_activityapi()
activity_get_activity in ./activity.module
API function.
activity_insert in ./activity.module
API function
activity_load in ./activity.module
activity_token_replace in ./activity.module
Determine what the message should say.
activity_views_handler_field_serial::render in views/activity_views_handler_field_serial.inc

File

./activity.module, line 738
activity.module

Code

function activity_invoke_activityapi(&$activity, $op) {
  $return = array();
  foreach (module_implements('activityapi') as $name) {
    $function = $name . '_activityapi';
    $result = $function($activity, $op);
    if (isset($result) && is_array($result)) {
      $return = array_merge($return, $result);
    }
    else {
      if (isset($result)) {
        $return[] = $result;
      }
    }
  }
  return $return;
}