function domain_set_domain in Domain Access 7.2
Same name and namespace in other branches
- 6.2 domain.module \domain_set_domain()
- 7.3 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 similuate 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.
3 calls to domain_set_domain()
- domain_content_view in domain_content/
domain_content.admin.inc - Content administration for a specific domain. This callback puts the user on the current domain and then fetches the appropirate content for batch editing.
- domain_cron in ./
domain.module - Implements hook_cron()
- domain_reset_domain in ./
domain.module - Reset the active domain to its initial version.
File
- ./
domain.module, line 1217 - 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);
}
}