You are here

public static function WorkflowScheduledTransition::loadBetween in Workflow 7.2

Same name and namespace in other branches
  1. 7 includes/Entity/WorkflowScheduledTransition.php \WorkflowScheduledTransition::loadBetween()

Given a timeframe, get all scheduled transitions.

deprecated: workflow_get_workflow_scheduled_transition_by_between() --> WorkflowScheduledTransition::loadBetween()

2 calls to WorkflowScheduledTransition::loadBetween()
workflow_cron in ./workflow.module
Implements hook_cron().
workflow_get_workflow_scheduled_transition_by_between in ./workflow.deprecated.inc
Given a timeframe, get all scheduled transitions.

File

includes/Entity/WorkflowScheduledTransition.php, line 75
Contains workflow\includes\Entity\WorkflowScheduledTransition.

Class

WorkflowScheduledTransition
Implements a scheduled transition, as shown on Workflow form.

Code

public static function loadBetween($start = 0, $end = 0) {
  $query = db_select('workflow_scheduled_transition', 'wst');
  $query
    ->fields('wst');
  $query
    ->orderBy('scheduled', 'ASC');
  $query
    ->addTag('workflow_scheduled_transition');
  if ($start) {
    $query
      ->condition('scheduled', $start, '>');
  }
  if ($end) {
    $query
      ->condition('scheduled', $end, '<');
  }
  $result = $query
    ->execute()
    ->fetchAll(PDO::FETCH_CLASS, 'WorkflowScheduledTransition');
  return $result;
}