You are here

function drush_domain_list in Domain Access 7.3

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

Show the domain list.

File

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

Code

function drush_domain_list() {
  $domains = domain_domains();
  $header = array(
    'weight' => dt('weight'),
    'sitename' => dt('sitename'),
    'subdomain' => dt('domain'),
    'scheme' => dt('scheme'),
    'valid' => dt('active'),
    'is_default' => dt('is_default'),
    'domain_id' => dt('domain_id'),
    'machine_name' => dt('machine_name'),
  );
  $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);
}