You are here

function workflow_get_transition_id in Workflow 5

Same name and namespace in other branches
  1. 5.2 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.

7 calls to workflow_get_transition_id()
workflow_actions_page in ./workflow.module
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.

... See full list

File

./workflow.module, line 1746

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));
}