You are here

public function ConfigSnapshotStorage::exists in Config Snapshot 8

Returns whether a configuration object exists.

Parameters

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

Return value

bool TRUE if the configuration object exists, FALSE otherwise.

Overrides StorageInterface::exists

2 calls to ConfigSnapshotStorage::exists()
ConfigSnapshotStorage::delete in src/ConfigSnapshotStorage.php
Deletes a configuration object from the storage.
ConfigSnapshotStorage::rename in src/ConfigSnapshotStorage.php
Renames a configuration object in the storage.

File

src/ConfigSnapshotStorage.php, line 102

Class

ConfigSnapshotStorage
Provides a configuration storage saved as simple configuration.

Namespace

Drupal\config_snapshot

Code

public function exists($name) {
  return !is_null($this->configSnapshot
    ->getItem($this->collection, $name));
}