You are here

function workflow_get_state_name in Workflow 6.2

Same name and namespace in other branches
  1. 6 workflow.module \workflow_get_state_name()

Given the ID of a state, return its name.

Parameters

integer $sid: The ID of the workflow state.

Return value

string The name of the workflow state.

3 calls to workflow_get_state_name()
workflow_execute_transition in ./workflow.module
Execute a transition (change state of a node).
workflow_select_given_state_action_submit in workflow_actions/workflow_actions.module
Submit handler for "Change workflow state of post to new state" action configuration form.
workflow_transition in ./workflow.module
Validate target state and either execute a transition immediately or schedule a transition to be executed later by cron.

File

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

Code

function workflow_get_state_name($sid) {
  return db_result(db_query('SELECT state FROM {workflow_states} WHERE sid = %d', $sid));
}