You are here

public function ConfigEventSubscriber::configRename in Tome 8

Reacts to rename event.

Parameters

\Drupal\Core\Config\ConfigRenameEvent $event: The configuration event.

File

modules/tome_sync/src/EventSubscriber/ConfigEventSubscriber.php, line 66

Class

ConfigEventSubscriber
Keeps the config export directory synced with config CRUD operations.

Namespace

Drupal\tome_sync\EventSubscriber

Code

public function configRename(ConfigRenameEvent $event) {
  if (!\Drupal::isConfigSyncing() && !isset($GLOBALS['_tome_sync_installing'])) {
    $this->configStorage
      ->rename($event
      ->getOldName(), $event
      ->getConfig()
      ->getName());
  }
}