You are here

function _workflow_creation_state in Workflow 6

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

Return the ID of the creation state for this workflow.

Parameters

$wid: The ID of the workflow.

4 calls to _workflow_creation_state()
workflow_admin_ui_edit_form_validate in workflow_admin_ui/workflow_admin_ui.module
Validate the workflow editing form.
workflow_field_choices in ./workflow.module
Get the states current user can move to for a given node.
workflow_node_current_state in ./workflow.module
Get the current state of a given node.
workflow_token_values in ./workflow.module
Implementation of hook_token_values().

File

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

Code

function _workflow_creation_state($wid) {
  static $cache;
  if (!isset($cache[$wid])) {
    $result = db_result(db_query("SELECT sid FROM {workflow_states} WHERE wid = %d AND sysid = %d", $wid, WORKFLOW_CREATION));
    $cache[$wid] = $result;
  }
  return $cache[$wid];
}