function drush_domain_get_from_argument in Domain Access 7.3
Same name and namespace in other branches
- 8 domain/domain.drush.inc \drush_domain_get_from_argument()
Converts a domain string or domain_id to a $domain array.
On failure, throws a drush error.
3 calls to drush_domain_get_from_argument()
- drush_domain_default in ./
domain.drush.inc - Set the default domain id.
- drush_domain_delete in ./
domain.drush.inc - Delete a domain record.
- drush_domain_test in ./
domain.drush.inc - Test a domain record.
File
- ./
domain.drush.inc, line 421 - Drush commands for Domain Access.
Code
function drush_domain_get_from_argument($argument) {
$domain = domain_lookup($argument);
if ($domain == -1) {
$domain = domain_lookup(NULL, $argument);
}
if ($domain == -1) {
drush_set_error('domain', dt('Domain record not found.'));
return FALSE;
}
return $domain;
}