You are here

function workflow_get_workflow_transitions_by_tid in Workflow 7

Same name and namespace in other branches
  1. 7.2 workflow.deprecated.inc \workflow_get_workflow_transitions_by_tid()

Given a tid, get the transition. It is a unique object, only one return.

1 call to workflow_get_workflow_transitions_by_tid()
workflow_transition_allowed in ./workflow.module
See if a transition is allowed for a given role.

File

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

Code

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