You are here

function workflow_get_workflow_transitions_by_target_sid in Workflow 7

Given a target_sid, get the transition.

File

./workflow.module, line 696
Support workflows made up of arbitrary states.

Code

function workflow_get_workflow_transitions_by_target_sid($target_sid) {
  static $transitions;
  if (!isset($transitions[$target_sid])) {
    $transitions[$target_sid] = db_query('SELECT tid, sid, target_sid, roles FROM {workflow_transitions} WHERE target_sid = :target_sid', array(
      ':target_sid' => $target_sid,
    ))
      ->fetchAll();
  }
  return $transitions[$target_sid];
}