public function ModuleInstaller::validateUninstall in Drupal 10
Same name in this branch
- 10 core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::validateUninstall()
- 10 core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::validateUninstall()
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::validateUninstall()
- 9 core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::validateUninstall()
File
- core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php, line 612
Class
- ModuleInstaller
- Default implementation of the module installer.
Namespace
Drupal\Core\ExtensionCode
public function validateUninstall(array $module_list) {
$reasons = [];
foreach ($module_list as $module) {
foreach ($this->uninstallValidators as $validator) {
$validation_reasons = $validator
->validate($module);
if (!empty($validation_reasons)) {
if (!isset($reasons[$module])) {
$reasons[$module] = [];
}
$reasons[$module] = array_merge($reasons[$module], $validation_reasons);
}
}
}
return $reasons;
}