You are here

function environment_load_workflow in Environment 7

Get the current assortment of Workflows.

Parameters

string $name: Name of the workflow to retrieve information on. Use 'default' to specify default or NULL workflow.

bool $reset: Optional; reset the static cache.

Return value

array Workflows.

7 calls to environment_load_workflow()
environment_admin_settings in ./environment.admin.inc
Environment admin form.
environment_drush_render_environment in ./environment.drush.inc
Render the specified environment definition as a descriptive one-liner.
environment_requirements in ./environment.install
Implements hook_requirements().
environment_switch_environment_submit in ./environment.admin.inc
Submit callback to switch environment if changed.
environment_token_list in ./environment.module
Implements hook_token_list().

... See full list

File

./environment.module, line 268
Module for handling changes in server environments

Code

function environment_load_workflow($name = NULL, $reset = FALSE) {
  static $workflows;
  if (empty($workflows) || $reset) {
    $workflows = module_invoke_all('environment_workflow');
    drupal_alter('environment_workflow', $workflows);
  }
  return isset($name) ? $workflows[$name] : $workflows;
}