You are here

function domain_drush_command in Domain Access 7.3

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

Implements hook_drush_command().

1 call to domain_drush_command()
domain_drush_help in ./domain.drush.inc
Implements hook_drush_help().

File

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

Code

function domain_drush_command() {
  $items = array();
  $items['domain-list'] = array(
    'description' => 'List active domains for the site.',
    'examples' => array(
      'drush domain-list',
      'drush domains',
    ),
    'aliases' => array(
      'domains',
    ),
  );
  $items['domain-add'] = array(
    'description' => 'Add a new domain to the site.',
    'examples' => array(
      'drush domain-add example.com \'My Test Site\'',
      'drush domain-add example.com \'My Test Site\' --inactive=1 --https==1',
      'drush domain-add example.com \'My Test Site\' --weight=10',
    ),
    'arguments' => array(
      'domain' => 'The domain to register (e.g. example.com).',
      'sitename' => 'The name of the site (e.g. Domain Two).',
    ),
    'options' => array(
      'inactive' => 'Set the domain to inactive status if set.',
      'https' => 'Use https protocol for this domain if set.',
      'weight' => 'Set the order (weight) of the domain.',
    ),
  );
  $items['domain-delete'] = array(
    'description' => 'Delete a domain from the site.',
    'examples' => array(
      'drush domain-delete example.com',
      'drush domain-delete 1',
    ),
    'arguments' => array(
      'domain' => 'The domain to register (e.g. example.com or the domain_id).',
    ),
  );
  $items['domain-test'] = array(
    'description' => 'Tests domains for proper response. If run from a subfolder, you must specify the --uri.',
    'examples' => array(
      'drush domain-test',
      'drush domain-test example.com',
      'drush domain-test 1',
    ),
    'arguments' => array(
      'domain' => 'The domain to register (e.g. example.com or the domain_id). If no value is passed, all domains are tested.',
    ),
  );
  $items['domain-default'] = array(
    'description' => 'Sets the default domain. If run from a subfolder, you must specify the --uri.',
    'examples' => array(
      'drush domain-default example.com',
      'drush domain-default 1',
      'drush domain-default 1 --skip_check=1',
    ),
    'arguments' => array(
      'domain' => 'The domain to make default (e.g. example.com or the domain_id).',
    ),
    'options' => array(
      'skip_check' => 'Bypass the domain response test.',
    ),
  );
  $items['generate-domains'] = array(
    'description' => 'Generate domains for testing.',
    'arguments' => array(
      'primary' => 'The primary domain to use. This will be created and used for *.example.com subdomains.',
    ),
    'options' => array(
      'count' => 'The count of extra domains to generate. Default is 15.',
      'empty' => 'Pass empty=1 to truncate the {domain} table before creating records.',
    ),
    'examples' => array(
      'drush domain-generate example.com',
      'drush domain-generate example.com --count=25',
      'drush domain-generate example.com --count=25 --empty=1',
      'drush gend',
      'drush gend --count=25',
      'drush gend --count=25 --empty=1',
    ),
    'aliases' => array(
      'gend',
    ),
  );
  $items['domain-repair'] = array(
    'description' => 'Updates domain_id 0 records in dependent tables.',
    'examples' => array(
      'drush domain-repair',
    ),
  );
  return $items;
}