1 module.inc module_load_all($bootstrap = FALSE)

Loads all the modules that have been enabled in the system table.


$bootstrap: Whether to load only the reduced set of modules loaded in "bootstrap mode" for cached pages. See bootstrap.inc.

Return value

If $bootstrap is NULL, return a boolean indicating whether all modules: have been loaded.


core/includes/module.inc, line 18
API for loading and interacting with Backdrop modules.


function module_load_all($bootstrap = FALSE) {
  static $has_run = FALSE;

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      backdrop_load('module', $module);
    // When fully loading all modules, clear the registry to make sure it
    // includes classes provided by non-bootstrap modules.
    if (!$bootstrap) {
      $has_run = TRUE;
  return $has_run;