You are here

function rules_scheduler_action in Rules 6

Base action implementation for scheduling all rule sets

1 string reference to 'rules_scheduler_action'
rules_scheduler_rules_action_info in rules_scheduler/rules_scheduler.rules.inc
Implementation of hook_rules_action_info().

File

rules_scheduler/rules_scheduler.rules.inc, line 61
Rules integration for the rules scheduler module.

Code

function rules_scheduler_action() {
  $args = func_get_args();

  // Remove additional information from the arguments array
  $state = array_pop($args);
  $element = array_pop($args);
  $settings = array_pop($args);

  // Remove task ID and date arguments
  $task_id = array_shift($args);
  $date = array_shift($args);

  // Remove task ID and date from info entry
  array_shift($element['#info']['arguments']);
  array_shift($element['#info']['arguments']);
  rules_scheduler_schedule_task($element['#info']['set'], $date, $task_id, $element['#info']['arguments'], $args, TRUE);
}