You are here

function workflow_get_all in Workflow 5.2

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

Get names and IDS of all workflows from the database.

Return value

An array of workflows keyed by ID.

5 calls to workflow_get_all()
workflow_add_form_validate in ./workflow.module
workflow_edit_form_validate in ./workflow.module
workflow_ng_condition_workflow_transition_is_form in contrib/workflow_workflow_ng/workflow_workflow_ng.module
workflow_overview in ./workflow.module
Create the main workflow page, which gives an overview of workflows and workflow states.
workflow_types_form in ./workflow.module

File

./workflow.module, line 1634

Code

function workflow_get_all() {
  $workflows = array();
  $result = db_query("SELECT wid, name FROM {workflows} ORDER BY name ASC");
  while ($data = db_fetch_object($result)) {
    $workflows[$data->wid] = check_plain(t($data->name));
  }
  return $workflows;
}