public function ThemeSettings::clear

Unsets value in this theme settings object.

Parameters

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

Return value

\Drupal\Core\Theme\ThemeSettings The theme settings object.

File

drupal/core/lib/Drupal/Core/Theme/ThemeSettings.php, line 136
Contains \Drupal\Core\Theme\ThemeSettings.

Class

ThemeSettings
Defines the default theme settings object.

Namespace

Drupal\Core\Theme

Code

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