You are here

function workflow_get_workflow_transitions_by_sid in Workflow 7

Given a sid, get the transition.

1 call to workflow_get_workflow_transitions_by_sid()
workflow_get_workflows_full_object in ./workflow.features.inc
For use by CRUD only, gather everything into the CRUD formed object.

File

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

Code

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