function environment_drush_command in Environment 7
Same name and namespace in other branches
- 8 environment.drush.inc \environment_drush_command()
- 6 environment.drush.inc \environment_drush_command()
Implements hook_drush_command().
File
- ./
environment.drush.inc, line 10 - Executes the environment_switch capabilities.
Code
function environment_drush_command() {
$items = array();
$items['environment-show'] = array(
'description' => 'Show the current environment state.',
'arguments' => array(
'workflow' => 'Specify the workflow whose current environment state you wish to check. Leave blank for all workflows.',
),
'drupal dependencies' => array(
'environment',
),
'aliases' => array(
'env',
'env-show',
'environment',
),
);
$items['environment-switch'] = array(
'description' => 'Switch the environment to specified state.',
'drupal dependencies' => array(
'environment',
),
'arguments' => array(
'target_env' => 'The target environment to which the site will be switched.',
),
'options' => array(
'force' => 'Whether an environment switch should be forced if the target enviornment is the same as the current environment.',
'nocacheclear' => 'Switching environments clears the cache by default, this stops that.',
),
'examples' => array(
'drush environment-switch development' => 'Switch the environment to development.',
'drush env-switch --force production' => 'Force the environment to switch to production even if the current environment already is production.',
'drush env-switch --nocacheclear production' => 'Switch environments but do not clear cache.',
),
'aliases' => array(
'env-switch',
),
);
return $items;
}