You are here

public function ConfigSnapshotStorage::delete in Config Snapshot 8

Deletes a configuration object from the storage.

Parameters

string $name: The name of a configuration object to delete.

Return value

bool TRUE on success, FALSE otherwise.

Overrides StorageInterface::delete

1 call to ConfigSnapshotStorage::delete()
ConfigSnapshotStorage::rename in src/ConfigSnapshotStorage.php
Renames a configuration object in the storage.

File

src/ConfigSnapshotStorage.php, line 143

Class

ConfigSnapshotStorage
Provides a configuration storage saved as simple configuration.

Namespace

Drupal\config_snapshot

Code

public function delete($name) {
  if (!$this
    ->exists($name)) {
    return FALSE;
  }
  $this->configSnapshot
    ->clearItem($this->collection, $name)
    ->save();
  return TRUE;
}