You are here

function drush_environment_current in Environment 8

Implements drush_hook_COMMAND for environment.

Render current environment with full description.

Return value

array Array of strings describing the environment(s).

File

./environment.drush.inc, line 99
Executes the environment_switch capabilities.

Code

function drush_environment_current() {
  $environment_id = \Drupal::config('environment.settings')
    ->get('environment');
  $environment = environment_load($environment_id);
  if (isset($environment)) {
    return drush_format($environment
      ->get('label'));
  }
  return;
}