W3cubDocs

/Drupal 8

public function Config::delete

public Config::delete()

Deletes the configuration object.

Return value

\Drupal\Core\Config\Config The configuration object.

Overrides StorableConfigBase::delete

File

core/lib/Drupal/Core/Config/Config.php, line 241

Class

Config
Defines the default configuration object.

Namespace

Drupal\Core\Config

Code

public function delete() {
  $this->data = array();
  $this->storage->delete($this->name);
  Cache::invalidateTags($this->getCacheTags());
  $this->isNew = TRUE;
  $this->resetOverriddenData();
  $this->eventDispatcher->dispatch(ConfigEvents::DELETE, new ConfigCrudEvent($this));
  $this->originalData = $this->data;
  return $this;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Config.php/function/Config::delete/8.1.x