function _unused_modules_get_available_modules in Unused Modules 7
Same name and namespace in other branches
- 6 unused_modules.module \_unused_modules_get_available_modules()
Returns an array of available modules.
2 calls to _unused_modules_get_available_modules()
- _unused_modules_get_enabled_modules in ./
unused_modules.inc - Returns an array of enabled modules.
- _unused_modules_get_modules_by_project in ./
unused_modules.inc - Returns an array with all available modules.
File
- ./
unused_modules.inc, line 63 - Common Unused Modules functionality.
Code
function _unused_modules_get_available_modules() {
$available_modules =& drupal_static(__FUNCTION__);
if (!isset($available_modules)) {
// Get all modules available.
$available_modules = drupal_system_listing("/\\.module\$/", "modules", 'name', 0);
// Sort for readability.
ksort($available_modules);
// Add module info.
_unused_modules_add_module_info($available_modules);
// Remove core modules.
_unused_modules_remove_core_modules($available_modules);
// Add information from .info file.
_unused_modules_add_info_file_information($available_modules);
// Add project info.
_unused_modules_add_project_path($available_modules);
}
return $available_modules;
}