/** * React to configuration ConfigEvent::RENAME events. * * @param \Drupal\Core\Config\ConfigRenameEvent $event * The event to process. */ public function onConfigRename(ConfigRenameEvent $event) { $this->autoExportConfig($event->getConfig()); }
/** * {@inheritdoc} */ public function onConfigRename(ConfigRenameEvent $event) { $config = $event->getConfig(); $name = $config->getName(); $old_name = $event->getOldName(); foreach (\Drupal::languageManager()->getLanguages() as $language) { $config_translation = $this->getOverride($language->getId(), $old_name); if (!$config_translation->isNew()) { $saved_config = $config_translation->get(); $storage = $this->getStorage($language->getId()); $storage->write($name, $saved_config); $config_translation->delete(); } } }