1 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.:


core/modules/system/system.module, line 3135
Configuration system that lets administrators modify the workings of the site.


function system_rebuild_module_data() {
  $modules_cache = &backdrop_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();
    system_get_files_database($modules, 'module');
    system_update_files_database($modules, 'module');
    $modules = _module_build_dependencies($modules);
    $modules_cache = $modules;
  return $modules_cache;