You are here

function workflow_get_all in Workflow 6.2

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_get_all()
  2. 5 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 workflow ID.

8 calls to workflow_get_all()
workflow_admin_ui_add_form_validate in workflow_admin_ui/workflow_admin_ui.module
Validate the workflow add form.
workflow_admin_ui_edit_form_validate in workflow_admin_ui/workflow_admin_ui.module
Validate the workflow editing form.
workflow_admin_ui_overview in workflow_admin_ui/workflow_admin_ui.module
Menu callback. Create the main workflow page, which gives an overview of workflows and workflow states.
workflow_admin_ui_types_form in workflow_admin_ui/workflow_admin_ui.module
Form builder. Allow administrator to map workflows to content types and determine placement.
workflow_rules_check_state_form in workflow_rules/workflow_rules.module
Configuration form for check state condition.

... See full list

File

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

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