Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Config.php

function 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\Config

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal