You are here

function drush_domain_disable in Domain Access 8

Disables a domain.

File

domain/domain.drush.inc, line 542
Drush commands for Domain Access.

Code

function drush_domain_disable($argument) {

  // Resolve the domain.
  if ($domain = drush_domain_get_from_argument($argument)) {
    if ($domain
      ->status()) {
      $domain
        ->disable();
      drush_print(dt('!domain has been disabled.', [
        '!domain' => $domain
          ->getHostname(),
      ]));
    }
    else {
      drush_print(dt('!domain is already disabled.', [
        '!domain' => $domain
          ->getHostname(),
      ]));
    }
  }
}