foreach ($uninstalls as $module) { foreach (array_keys($module_data[$module]->required_by
) as $dependent_module) { if ($module_data[$dependent_module]->status && !
in_array($dependent_module,
$uninstalls, TRUE
) &&
$dependent_module !==
$install_profile) { $module_name =
$module_data[$module]->info
['name'
];
$dependent_module_name =
$module_data[$dependent_module]->info
['name'
];
$config_importer->
logError($this->
t('Unable to uninstall the %module module since the %dependent_module module is installed.',
['%module' =>
$module_name, '%dependent_module' =>
$dependent_module_name]));
} } // Ensure that modules can be uninstalled.
foreach ($this->uninstallValidators
as $validator) { $reasons =
$validator instanceof ConfigImportModuleUninstallValidatorInterface ?
$validator->
validateConfigImport($module,
$config_importer->
getStorageComparer()->
getSourceStorage()) :
$validator->
validate($module);
foreach ($reasons as $reason) { $config_importer->
logError($this->
t('Unable to uninstall the %module module because: @reason.',
['%module' =>
$module_data[$module]->info
['name'
], '@reason' =>
$reason]));
} } } // Ensure that the install profile is not being uninstalled.
if (in_array($install_profile,
$uninstalls, TRUE
)) { $profile_name =
$module_data[$install_profile]->info
['name'
];