system_rebuild_module_data

Versions
7
system_rebuild_module_data()

Rebuild, save, and return data about all currently available modules.

Return value

Array of all available modules and their data.

▾ 10 functions call system_rebuild_module_data()

drupal_install_modules in includes/install.inc
Calls the install function for a given list of modules.
drupal_install_system in includes/install.inc
Callback to install the system module.
help_links_as_list in modules/help/help.admin.inc
install_finished in ./install.php
Installation task; perform final steps and display a 'finished' page.
install_profile_modules in ./install.php
Installation task; install required modules via a batch process.
system_modules in modules/system/system.admin.inc
Menu callback; provides module enable/disable interface.
system_modules_submit in modules/system/system.admin.inc
Submit callback; handles modules form submission.
update_check_incompatibility in includes/update.inc
Helper function to test compatibility of a module or theme.
update_get_projects in modules/update/update.compare.inc
Fetch an array of installed and enabled projects.
_registry_rebuild in includes/registry.inc
@see registry_rebuild.

Code

modules/system/system.module, line 2195

<?php
function system_rebuild_module_data() {
  $modules = _system_rebuild_module_data();
  ksort($modules);
  system_get_files_database($modules, 'module');
  system_update_files_database($modules, 'module');
  // Refresh bootstrap status.
  $bootstrap_modules = array();
  foreach (bootstrap_hooks() as $hook) {
    foreach (module_implements($hook) as $module) {
      $bootstrap_modules[] = $module;
    }
  }
  $query = db_update('system')->fields(array('bootstrap' => 0));
  if ($bootstrap_modules) {
    db_update('system')
      ->fields(array('bootstrap' => 1))
      ->condition('name', $bootstrap_modules, 'IN')
      ->execute();
    $query->condition('name', $bootstrap_modules, 'NOT IN');
  }
  $query->execute();
  $modules = _module_build_dependencies($modules);
  return $modules;
}
?>
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.