function system_rebuild_module_data
Same name in other branches
- 8.9.x core/modules/system/system.module \system_rebuild_module_data()
Rebuild, save, and return data about all currently available modules.
Return value
Array of all available modules and their data.
16 calls to system_rebuild_module_data()
- drupal_install_system in includes/
install.inc - Installs the system module.
- drupal_uninstall_modules in includes/
install.inc - Uninstalls a given list of disabled modules.
- EnableDisableTestCase::testEnableDisable in modules/
system/ system.test - Test that all core modules can be enabled, disabled and uninstalled.
- field_ui_fields_list in modules/
field_ui/ field_ui.admin.inc - Menu callback; lists all defined fields for quick reference.
- help_links_as_list in modules/
help/ help.admin.inc - Provides a formatted list of available help topics.
2 string references to 'system_rebuild_module_data'
- ModuleUnitTest::testDependencyResolution in modules/
simpletest/ tests/ module.test - Test dependency resolution.
- system_list_reset in includes/
module.inc - Resets all system_list() caches.
File
-
modules/
system/ system.module, line 2483
Code
function system_rebuild_module_data() {
$modules_cache =& drupal_static(__FUNCTION__);
// Only rebuild once per request. $modules and $modules_cache cannot be
// combined into one variable, because the $modules_cache variable is reset by
// reference from system_list_reset() during the rebuild.
if (!isset($modules_cache)) {
$modules = _system_rebuild_module_data();
ksort($modules);
system_get_files_database($modules, 'module');
system_update_files_database($modules, 'module');
$modules = _module_build_dependencies($modules);
$modules_cache = $modules;
}
return $modules_cache;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.