You are here

function domain_get_domain in Domain Access 7.2

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

Return the currently active domain.

This value is stored in a global, but having a function will let us replace that with a static function in D7.

This function should be used by all callers who do not need to modify the global variable.

Return value

An array of data defining the currently active domain.

25 calls to domain_get_domain()
domain_alias_init in domain_alias/domain_alias.module
Implements hook_init().
domain_block_view_server in ./domain.blocks.inc
Prints information about the current HTTP request.
domain_check_primary in ./domain.module
Check to see if a redirect to the primary domain is needed.
domain_conf_domain_bootstrap_full in domain_conf/domain_conf.module
Implements hook_domain_bootstrap_full().
domain_content_alter_node_query in domain_content/domain_content.admin.inc
Abstraction to allow query alters outside of node access.

... See full list

File

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

Code

function domain_get_domain() {
  if (isset($GLOBALS['_domain'])) {
    return $GLOBALS['_domain'];
  }
}