function Config::delete
Same name in other branches
- 9 core/lib/Drupal/Core/Config/Config.php \Drupal\Core\Config\Config::delete()
- 8.9.x core/lib/Drupal/Core/Config/Config.php \Drupal\Core\Config\Config::delete()
- 11.x core/lib/Drupal/Core/Config/Config.php \Drupal\Core\Config\Config::delete()
Deletes the configuration object.
Return value
$this The configuration object.
Overrides StorableConfigBase::delete
1 method overrides Config::delete()
- ImmutableConfig::delete in core/
lib/ Drupal/ Core/ Config/ ImmutableConfig.php - Deletes the configuration object.
File
-
core/
lib/ Drupal/ Core/ Config/ Config.php, line 241
Class
- Config
- Defines the default configuration object.
Namespace
Drupal\Core\ConfigCode
public function delete() {
$this->data = [];
$this->storage
->delete($this->name);
Cache::invalidateTags($this->getCacheTags());
$this->isNew = TRUE;
$this->resetOverriddenData();
$event_name = $this->getStorage()
->getCollectionName() === StorageInterface::DEFAULT_COLLECTION ? ConfigEvents::DELETE : ConfigCollectionEvents::DELETE_IN_COLLECTION;
$this->eventDispatcher
->dispatch(new ConfigCrudEvent($this), $event_name);
$this->originalData = $this->data;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.