function _simplified_modules_module_build_dependencies in Simplified Modules 7
Helper function to calculate module dependencies without a full rebuild.
This avoids some load by not doing a full system_rebuild_module_data() when there is no need to. It also leaves out the install profile, whose "dependencies" aren't real dependencies and which can cause problems for our purposes.
1 call to _simplified_modules_module_build_dependencies()
- simplified_modules_system_modules_submit in ./
simplified_modules.module - Custom submit handler for the system_modules() admin page.
File
- ./
simplified_modules.module, line 202 - Simplifies the modules page by allowing related modules to be grouped under a single checkbox.
Code
function _simplified_modules_module_build_dependencies() {
$modules = db_query('SELECT name, info FROM {system} WHERE type = :type', array(
':type' => 'module',
))
->fetchAllAssoc('name');
foreach ($modules as &$module) {
$module->info = unserialize($module->info);
}
$modules = _module_build_dependencies($modules);
$profile = drupal_get_profile();
unset($modules[$profile]);
return $modules;
}