You are here

function workflow_get_workflow_names in Workflow 7.2

Same name and namespace in other branches
  1. 8 workflow.module \workflow_get_workflow_names()

Get an options list for workflows (to show in a widget).

To be used in non-OO modules.

Return value

array $options An array of $wid => workflow->label().

1 call to workflow_get_workflow_names()
WorkflowItem::settingsForm in includes/Field/WorkflowItem.php
Implements hook_field_settings_form() -> ConfigFieldItemInterface::settingsForm().

File

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

Code

function workflow_get_workflow_names() {
  $options = array();
  foreach (workflow_load_multiple() as $workflow) {
    $options[$workflow->wid] = $workflow
      ->label();
  }
  return $options;
}