You are here

function drush_domain_list in Domain Access 6.2

Same name and namespace in other branches
  1. 8 domain/domain.drush.inc \drush_domain_list()
  2. 7.3 domain.drush.inc \drush_domain_list()
  3. 7.2 domain.drush.inc \drush_domain_list()

Show the domain list.

File

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

Code

function drush_domain_list() {
  $domains = domain_domains();
  $header = array(
    'sitename' => dt('sitename'),
    'subdomain' => dt('domain'),
    'scheme' => dt('scheme'),
    'valid' => dt('active'),
    'domain_id' => dt('domain_id'),
  );
  $rows = array(
    array_values($header),
  );
  foreach ($domains as $domain) {
    $row = array();
    foreach ($header as $key => $name) {
      $row[] = check_plain($domain[$key]);
    }
    $rows[] = $row;
  }
  drush_print_table($rows, TRUE);
}