You are here

function workflow_get_transition_id in Workflow 6

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_get_transition_id()
  2. 5 workflow.module \workflow_get_transition_id()
  3. 6.2 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_actions_workflow in workflow_actions/workflow_actions.module
Implementation of hook_workflow().
workflow_admin_ui_transition_grid_form in workflow_admin_ui/workflow_admin_ui.module
Form builder. Build the grid of transitions for defining a workflow.
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.

... See full list

File

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

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