You are here

function drush_domain_enable in Domain Access 8

Enables a domain.

File

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

Code

function drush_domain_enable($argument) {

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