You are here

function workbench_workflows_options in Workbench Moderation 7.2

Create an array of exportable states/events/workflows suitable for FAPI.

Parameters

string $type: Allowed values are 'states', 'events', and 'workflows'

string $name: The machine name of the exportable.

$reset: A boolean for whether the static cache should be reset.

5 calls to workbench_workflows_options()
workbench_events_ui::edit_form in modules/workbench_workflows/plugins/export_ui/workbench_events_ui.class.php
Provide the actual editing form.
workbench_moderation_handler_filter_state::get_value_options in includes/workbench_moderation_handler_filter_state.inc
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.
workbench_moderation_preprocess_state_flow_history_entity in ./workbench_moderation.module
Prepare variables for the state_flow_history_entity template.
workbench_workflows_entity_revision_operation_info in modules/workbench_workflows/workbench_workflows.module
Implements hook_entity_revision_operation_info().
workbench_workflows_ui::edit_form in modules/workbench_workflows/plugins/export_ui/workbench_workflows_ui.class.php
Provide the actual editing form.

File

modules/workbench_workflows/workbench_workflows.module, line 44
workbench_workflows.module

Code

function workbench_workflows_options($type = 'states', $label_key = 'admin_title', $reset = FALSE) {

  // load all objects of this type
  $exportables = workbench_workflows_load_enabled($type, $reset);
  $return = array();
  foreach ($exportables as $exportable) {
    $return[$exportable->name] = $exportable->{$label_key};
  }
  return $return;
}