1 module.inc | backdrop_required_modules() |
Returns an array of modules required by core.
File
- core/
includes/ module.inc, line 1019 - API for loading and interacting with Backdrop modules.
Code
function backdrop_required_modules() {
$files = backdrop_system_listing('/^' . BACKDROP_PHP_FUNCTION_PATTERN . '\.info$/', 'modules', 'name', 0);
$required = array();
// An installation profile is required and one must always be loaded.
$required[] = backdrop_get_profile();
foreach ($files as $name => $file) {
$info = backdrop_parse_info_file($file->uri);
if (!empty($info) && !empty($info['required']) && $info['required']) {
$required[] = $name;
}
}
return $required;
}