You are here

function js_bootstrap in JS Callback Handler 7.2

Ensures Drupal is bootstrapped to the specified phase.

Parameters

int $phase: A constant telling which phase to bootstrap to.

bool $new_phase: A boolean, set to FALSE if calling drupal_bootstrap from inside a function called from drupal_bootstrap (recursion).

Return value

int The most recently completed phase.

See also

drupal_bootstrap()

7 calls to js_bootstrap()
JsProxyCache::doFullBootstrap in src/JsProxyCache.php
Fully bootstraps Drupal.
js_callback_bootstrap in includes/callback.inc
Bootstraps Drupal to the correct level based on callback info.
js_deliver_json in includes/json.inc
Callback for delivering JSON responses to the browser.
js_execute_request in ./js.module
Loads the requested module and executes the requested callback.
js_get_callback in ./js.module
Provides callback information provided by modules.

... See full list

File

./js.module, line 825
JavaScript callback handler module.

Code

function js_bootstrap($phase = NULL, $new_phase = TRUE) {

  // If we have a bootstrap level greater or equal to language initialization,
  // we need to update path, because otherwise path initialization will fail.
  if ($phase >= DRUPAL_BOOTSTRAP_LANGUAGE) {
    js_update_path();
  }
  return drupal_bootstrap($phase, $new_phase);
}