You are here

function hook_domain_bootstrap in Domain Access 7.2

Same name and namespace in other branches
  1. 6.2 API.php \hook_domain_bootstrap()
  2. 7.3 domain.api.php \hook_domain_bootstrap()

The Domain Bootstrap Process.

There are some variables that Domain Access and its modules need to set before Drupal finishes loading. In effect, we have to add stages to the Drupal bootstrap process.

These processes are initiated after settings.php is loaded, during DRUPAL_BOOTSTRAP_CONFIGURATION. We skip ahead and load DRUPAL_BOOTSTRAP_DATABASE to access db_query() and similar functions. However, the majority of Drupal functions are not yet available.

The following modules will load during the bootstrap process, if enabled: -- domain -- domain_alias -- domain_conf -- domain_prefix

If you create a custom module, it must be registered with the Domain Bootstrap Process. To register, you must:

1) Implement either or both of the following hooks: -- hook_domain_bootstrap_load(). -- hook_domain_bootstrap_full(). 2) Run domain_bootstrap_register() in mymodule_enable(). 3) Run domain_bootstrap_unregister('mymodule') in mymodule_disable().

File

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

Code

function hook_domain_bootstrap() {

  // Documentation function.
}