ConfigSubscriber::onConfigImporterValidate

public ConfigSubscriber::onConfigImporterValidate(ConfigImporterEvent $event)

Checks that the Configuration module is not being uninstalled.

Parameters

ConfigImporterEvent $event: The config import event.

Overrides ConfigImportValidateEventSubscriberBase::onConfigImporterValidate

File

core/modules/config/src/ConfigSubscriber.php, line 21

Class

ConfigSubscriber
Config subscriber.

Namespace

Drupal\config

Code

public function onConfigImporterValidate(ConfigImporterEvent $event) {
  $importer = $event->getConfigImporter();
  $core_extension = $importer->getStorageComparer()->getSourceStorage()->read('core.extension');
  if (!isset($core_extension['module']['config'])) {
    $importer->logError($this->t('Can not uninstall the Configuration module as part of a configuration synchronization through the user interface.'));
  }
}
doc_Drupal
2016-10-29 08:54:31
Comments
Leave a Comment

Please login to continue.