function domain_set_domain in Domain Access 7.3
Same name and namespace in other branches
- 6.2 domain.module \domain_set_domain()
- 7.2 domain.module \domain_set_domain()
Set the active domain to something other than the HTTP request.
This function is used in cases where you wish to simulate the loading of a domain while on another domain.
Parameters
$domain_id: The domain id of the domain to load.
$bootstrap: Boolean flag that indicates whether to run domain bootstrap load.
Return value
No return value. The global $_domain value is altered, and domain-specific data functions are loaded.
8 calls to domain_set_domain()
- DomainCacheTest::testDomainPageCache in tests/
domain.test - DomainFilterTest::testDomainURLFilters in tests/
domain.test - DomainHookTest::testDomainHooks in tests/
domain.test - DomainSwitchingTest::testDomainSwitching in tests/
domain.test - DomainTokenTest::testDomainTokens in tests/
domain.test - Test the domain tokens.
File
- ./
domain.module, line 1527 - Core module functions for the Domain Access suite.
Code
function domain_set_domain($domain_id, $bootstrap = FALSE) {
global $_domain;
$_domain = domain_load($domain_id);
// Now re-run the bootstrap.
if ($bootstrap) {
_domain_bootstrap_invoke_all('full', $_domain);
}
}