Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function setConfig(Config $base_config, LanguageConfigOverride $config_translation, $config_values, $base_key = NULL)
 {
     // Save the configuration values, if they are different from the source
     // values in the base configuration. Otherwise remove the override.
     if ($base_config->get($base_key) !== $config_values) {
         $config_translation->set($base_key, $config_values);
     } else {
         $config_translation->clear($base_key);
     }
 }
Ejemplo n.º 2
0
 /**
  * @covers ::delete
  */
 public function testDelete()
 {
     $this->cacheTagsInvalidator->expects($this->once())->method('invalidateTags')->with(['config:config.test']);
     $this->configTranslation->initWithData([]);
     $this->configTranslation->delete();
 }
 /**
  * {@inheritdoc}
  */
 public function getOverride($langcode, $name)
 {
     $storage = $this->getStorage($langcode);
     $data = $storage->read($name);
     $override = new LanguageConfigOverride($name, $storage, $this->typedConfigManager);
     if (!empty($data)) {
         $override->initWithData($data);
     }
     return $override;
 }