function drush_enforce_requirement_bootstrap_phase

8.0.x command.inc drush_enforce_requirement_bootstrap_phase(&$command)
6.x command.inc drush_enforce_requirement_bootstrap_phase(&$command)
7.x command.inc drush_enforce_requirement_bootstrap_phase(&$command)
3.x command.inc drush_enforce_requirement_bootstrap_phase(&$command)
4.x command.inc drush_enforce_requirement_bootstrap_phase(&$command)
5.x command.inc drush_enforce_requirement_bootstrap_phase(&$command)
master command.inc drush_enforce_requirement_bootstrap_phase(&$command)

Check that a command is valid for the current bootstrap phase.

Parameters

$command: Command to check. Any errors will be added to the 'bootstrap_errors' element.

Return value

TRUE if command is valid.

1 call to drush_enforce_requirement_bootstrap_phase()

File

includes/command.inc, line 1744
The drush command engine.

Code

function drush_enforce_requirement_bootstrap_phase(&$command) {
  $valid = array();
  $current_phase = drush_get_context('DRUSH_BOOTSTRAP_PHASE');
  if ($command['bootstrap'] <= $current_phase) {
    return TRUE;
  }
  // TODO: provide description text for each bootstrap level so we can give
  // the user something more helpful and specific here.
  $command['bootstrap_errors']['DRUSH_COMMAND_INSUFFICIENT_BOOTSTRAP'] = dt('Command !command needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.', array('!command' => $command['command']));
}