1 actions_loop_test.module | actions_loop_test_watchdog(array $log_entry) |
Implements hook_watchdog().
File
- core/
modules/ simpletest/ tests/ actions_loop_test.module, line 6
Code
function actions_loop_test_watchdog(array $log_entry) {
// If the triggering actions are not explicitly enabled, abort.
if (empty($_GET['trigger_actions_on_watchdog']) || $log_entry['type'] !== 'actions_loop_test') {
return;
}
// We can pass in any applicable information in $context.
$context = array(
'log_entry' => $log_entry,
);
// Fire the actions on the associated object ($log_entry) and the context
// variable.
$action_name = $_GET['trigger_actions_on_watchdog'];
actions_execute($action_name, NULL, $context);
}