public function FieldUninstallValidator::validateConfigImport in Drupal 10
Determines reasons a module can not be uninstalled prior to config import.
Parameters
string $module: A module name.
\Drupal\Core\Config\StorageInterface $source_storage: Storage object used to read configuration that is about to be imported.
Return value
string[] An array of reasons the module can not be uninstalled, empty if it can. Each reason should not end with any punctuation since multiple reasons can be displayed together.
Overrides ConfigImportModuleUninstallValidatorInterface::validateConfigImport
See also
\Drupal\Core\EventSubscriber\ConfigImportSubscriber::validateModules()
File
- core/
modules/ field/ src/ FieldUninstallValidator.php, line 79
Class
- FieldUninstallValidator
- Prevents uninstallation of modules providing active field storage.
Namespace
Drupal\fieldCode
public function validateConfigImport(string $module, StorageInterface $source_storage) : array {
// The field_config_import_steps_alter() method removes field data prior to
// configuration import so the checks in ::validate() are unnecessary.
return [];
}