private static function UnusedModulesHelperService::removeCoreModules in Unused Modules 8
Remove core modules.
Parameters
\Drupal\unused_modules\UnusedModulesExtensionDecorator[] $modules: List of modules.
1 call to UnusedModulesHelperService::removeCoreModules()
- UnusedModulesHelperService::getAvailableModules in src/
UnusedModulesHelperService.php - Returns an array of available modules.
File
- src/
UnusedModulesHelperService.php, line 156
Class
- UnusedModulesHelperService
- Common Unused Modules functionality.
Namespace
Drupal\unused_modulesCode
private static function removeCoreModules(&$modules) {
// Removes core modules from the array.
foreach ($modules as $key => $module) {
if ($module
->getOrigin() === 'core') {
unset($modules[$key]);
}
}
}