public function Config::clear

Unsets value in this config object.

Parameters

string $key: Name of the key whose value should be unset.

Return value

Drupal\Core\Config\Config The configuration object.

File

drupal/core/lib/Drupal/Core/Config/Config.php, line 311
Definition of Drupal\Core\Config\Config.

Class

Config
Defines the default configuration object.

Namespace

Drupal\Core\Config

Code

public function clear($key) {
  $parts = explode('.', $key);
  if (count($parts) == 1) {
    unset($this->data[$key]);
  }
  else {
    NestedArray::unsetValue($this->data, $parts);
  }
  $this
    ->resetOverriddenData();
  return $this;
}