You are here

function hook_domain_load in Domain Access 7.3

Same name and namespace in other branches
  1. 8 domain/domain.api.php \hook_domain_load()

Notifies other modules that we are loading a domain record from the database.

Modules may overwrite or add to the $domain array for each domain.

When loading lists of domains or generating domain information, either use the proper functions -- domain_default(), domain_lookup(), and domain_domains() -- or invoke this hook.

Invoked by domain_lookup() and domain_default().

Parameters

&$domain: The current $domain array.

Return value

No return value. The $domain array is modified by reference..

Related topics

3 functions implement hook_domain_load()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

domain_alias_domain_load in domain_alias/domain_alias.domain.inc
Implements hook_domain_load().
domain_domain_load in ./domain.module
Implements hook_domain_load().
domain_test_domain_load in tests/domain_test.domain.inc
Implements hook_domain_load().
1 invocation of hook_domain_load()
domain_api in ./domain.module
Helper function for passing hook_domain_load() by reference.

File

./domain.api.php, line 35
API documentation file.

Code

function hook_domain_load(&$domain) {

  // Add a variable to the $domain array.
  $domain['myvar'] = 'mydomainvar';

  // Remove the site_grant flag, removing access to 'all affiliates.'
  $domain['site_grant'] = FALSE;
}