You are here

function _environment_state_options_all in Environment 6

Same name and namespace in other branches
  1. 7 environment.module \_environment_state_options_all()

Build an options widget with all workflows.

Options do not need namespacing because environment machine name is unique. If the same environment needs to come up in multiple places, that should be handled by duplicating the definition and changing the machine name.

Parameters

$reset: Optional; reset the static cache.

See also

hook_environment

1 call to _environment_state_options_all()
environment_context_condition::condition_values in plugins/environment_context_condition.inc
Override for context_condition::condition_values().

File

./environment.module, line 324

Code

function _environment_state_options_all($reset = FALSE) {
  $options = array();
  $workflows = environment_workflow_load();
  foreach ($workflows as $name => $workflow) {
    $options[$name] = $workflow['label'];
    $w_opts = _environment_state_options($name, TRUE, '-- ', $reset);
    $options = array_merge($options, $w_opts);
  }
  return $options;
}