You are here

function watchdog_triggers_watchdog_triggers in Logging and alerts 6.2

Same name and namespace in other branches
  1. 6 watchdog_triggers/watchdog_triggers.module \watchdog_triggers_watchdog_triggers()
  2. 7.2 watchdog_triggers/watchdog_triggers.module \watchdog_triggers_watchdog_triggers()
  3. 7 watchdog_triggers/watchdog_triggers.module \watchdog_triggers_watchdog_triggers()

Implementation of hook_watchdog_triggers().

File

watchdog_triggers/watchdog_triggers.module, line 28
Provides a Trigger and Action integration for watchdog events.

Code

function watchdog_triggers_watchdog_triggers($op, $user) {
  if (!in_array($op, array(
    'watchdog_logged',
  ))) {
    return;
  }
  $aids = _trigger_get_hook_aids('watchdog_triggers', $op);
  $context = array(
    'hook' => 'watchdog_triggers',
    'op' => $op,
    'user' => $user,
  );
  actions_do(array_keys($aids), $user, $context);
}