You are here

function workflow_get_transition_id in Workflow 5.2

Same name and namespace in other branches
  1. 5 workflow.module \workflow_get_transition_id()
  2. 6.2 workflow.module \workflow_get_transition_id()
  3. 6 workflow.module \workflow_get_transition_id()

Get the tid of a transition, if it exists.

Parameters

int $from: ID (sid) of originating state.

int $to: ID (sid) of target state.

Return value

int Tid or FALSE if no such transition exists.

6 calls to workflow_get_transition_id()
workflow_execute_transition in ./workflow.module
Execute a transition (change state of a node).
workflow_state_delete in ./workflow.module
Delete a workflow state from the database, including any transitions the state was involved in and any associations with actions that were made to that transition.
workflow_transition_add_role in ./workflow.module
Add a role to the list of those allowed for a given transition. Add the transition if necessary.
workflow_transition_delete_role in ./workflow.module
Remove a role from the list of those allowed for a given transition.
workflow_transition_grid_form in ./workflow.module
Build the grid of transitions for defining a workflow.

... See full list

File

./workflow.module, line 1951

Code

function workflow_get_transition_id($from, $to) {
  return db_result(db_query("SELECT tid FROM {workflow_transitions} WHERE sid=%d AND target_sid=%d", $from, $to));
}