getOldName example

$this->filterOverride($config$config_translation);
      }
    }
  }

  /** * {@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();
      }
    }
  }

  
Home | Imprint | This part of the site doesn't use cookies.