You are here

function domain_initial_domain in Domain Access 7.3

Same name and namespace in other branches
  1. 6.2 domain.module \domain_initial_domain()
  2. 7.2 domain.module \domain_initial_domain()

Store the initially loaded domain, for later use.

Parameters

$domain: The domain global value. This should only be called once.

Return value

$initial A copy of the initial $_domain global value.

See also

domain_init()

5 calls to domain_initial_domain()
DomainTestCase::domainResetBaseUrl in tests/domain.test
Resets $base_url to the initial domain.
DomainTestCase::setUp in tests/domain.test
On setup, install our module and create a default domain.
domain_form_alter in ./domain.module
Implements hook_form_alter().
domain_init in ./domain.module
Implements hook_init().
domain_reset_domain in ./domain.module
Reset the active domain to its initial version.
1 string reference to 'domain_initial_domain'
DomainTestCase::setUp in tests/domain.test
On setup, install our module and create a default domain.

File

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

Code

function domain_initial_domain($domain = array()) {
  $initial =& drupal_static(__FUNCTION__);
  if (!isset($initial) && !empty($domain)) {
    $initial = $domain;
  }
  return $initial;
}