module_load_all

Versions
4.6 – 6
module_load_all()
7
module_load_all($bootstrap = FALSE)

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

Parameters

$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.

▾ 3 functions call module_load_all()

_drupal_bootstrap_full in includes/common.inc
_drupal_bootstrap_variables in includes/bootstrap.inc
Bootstrap variables: Load system variables and all enabled bootstrap modules.
_theme_load_registry in includes/theme.inc
Get the theme_registry cache from the database; if it doesn't exist, build it.

Code

includes/module.inc, line 18

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

  if (isset($bootstrap)) {
    foreach (module_list(TRUE, $bootstrap) as $module) {
      drupal_load('module', $module);
    }
    // $has_run will be TRUE if $bootstrap is FALSE.
    $has_run = !$bootstrap;
  }
  return $has_run;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.