You are here

function environment_drush_render_environment in Environment 8

Same name and namespace in other branches
  1. 6 environment.drush.inc \environment_drush_render_environment()
  2. 7 environment.drush.inc \environment_drush_render_environment()

Render the specified environment definition as a descriptive one-liner.

Parameters

array $state: Array defining an environment state.

bool $show_workflow: Optional; default to TRUE. If there are more than one workflows defined in the system, will prefix the return with the workflow's label. If set to FALSE this is skipped. This is separate from $verbose because you could want a verbose description in a workflow-specific context.

bool $verbose: Optional; defaults to FALSE. If TRUE, will include the environment description.

Return value

string String describing the specified environment.

1 call to environment_drush_render_environment()
drush_environment_switch in ./environment.drush.inc
Implements drush_hook_COMMAND for environment_switch.

File

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

Code

function environment_drush_render_environment($environment, $verbose = FALSE) {
  return $environment
    ->get('label') . ' (' . $environment
    ->get('id') . ')';
}