You are here

public function SystemConfigSubscriber::onConfigImporterValidateSiteUUID in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/SystemConfigSubscriber.php \Drupal\system\SystemConfigSubscriber::onConfigImporterValidateSiteUUID()

Checks that the configuration synchronization is valid.

This event listener checks that the system.site:uuid's in the source and target match.

Parameters

ConfigImporterEvent $event: The config import event.

File

core/modules/system/src/SystemConfigSubscriber.php, line 79
Contains \Drupal\system\SystemConfigSubscriber.

Class

SystemConfigSubscriber
System Config subscriber.

Namespace

Drupal\system

Code

public function onConfigImporterValidateSiteUUID(ConfigImporterEvent $event) {
  if (!$event
    ->getConfigImporter()
    ->getStorageComparer()
    ->validateSiteUuid()) {
    $event
      ->getConfigImporter()
      ->logError($this
      ->t('Site UUID in source storage does not match the target storage.'));
  }
}