/**
  * Filters data in the override based on what is currently in configuration.
  *
  * @param \Drupal\Core\Config\Config $config
  *   Current configuration object.
  * @param \Drupal\Core\Config\StorableConfigBase $override
  *   Override object corresponding to the configuration to filter data in.
  */
 protected function filterOverride(Config $config, StorableConfigBase $override)
 {
     $override_data = $override->get();
     $this->filterNestedArray($config->get(), $override_data);
     if (empty($override_data)) {
         // If no override values are left that would apply, remove the override.
         $override->delete();
     } else {
         // Otherwise set the filtered override values back.
         $override->setData($override_data)->save();
     }
 }
예제 #2
0
파일: Config.php 프로젝트: sarahwillem/OD8
 /**
  * {@inheritdoc}
  */
 public function setData(array $data)
 {
     parent::setData($data);
     $this->resetOverriddenData();
     return $this;
 }
예제 #3
0
파일: Config.php 프로젝트: nstielau/drops-8
 /**
  * {@inheritdoc}
  */
 public function setData(array $data, $validate_keys = TRUE)
 {
     parent::setData($data, $validate_keys);
     $this->resetOverriddenData();
     return $this;
 }