You are here

function domain_list_by_machine_name in Domain Access 7.3

Returns a map of domains by machine name.

Return value

An array keyed by domain machine_name whose values are domain records.

1 call to domain_list_by_machine_name()
domain_load_domain_id in ./domain.module
Loads a domain_id from its machine name.
1 string reference to 'domain_list_by_machine_name'
domain_static_reset in ./domain.module
Clear static caches used for domain listings.

File

./domain.module, line 3817
Core module functions for the Domain Access suite.

Code

function domain_list_by_machine_name() {
  $domains =& drupal_static(__FUNCTION__);
  if (!isset($domains)) {
    $list = domain_domains();
    foreach ($list as $record) {
      $domains[$record['machine_name']] = $record;
    }
  }
  return $domains;
}