You are here

function revisioning_revisioning in Revisioning 6

Same name and namespace in other branches
  1. 6.4 revisioning_triggers_actions.inc \revisioning_revisioning()
  2. 6.3 revisioning_triggers_actions.inc \revisioning_revisioning()

Implementation of hook_<trigger_name>().

Note confusing name due to fact that trigger name needs to equal module name.

Parameters

$op: trigger operation name

See also

revisioning_hook_info()

File

./revisioning_triggers_actions.inc, line 41
Triggers and actions supported by the revisioning module.

Code

function revisioning_revisioning($op) {
  if (!module_exists("trigger")) {
    return;
  }
  $action_ids = array_keys(_trigger_get_hook_aids('revisioning', $op));
  if (empty($action_ids)) {
    return;
  }
  watchdog('revisioning', '%op trigger is actioning "@aids"', array(
    '%op' => $op,
    '@aids' => implode(', ', $action_ids),
  ));
  global $user;
  $context = array(
    'hook' => 'revisioning',
    'op' => $op,
    'user' => $user,
  );
  actions_do($action_ids, $user, $context);
}