You are here

public function ConfigSnapshotStorage::read in Config Snapshot 8

Reads configuration data from the storage.

Parameters

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

Return value

array|bool The configuration data stored for the configuration object name. If no configuration data exists for the given name, FALSE is returned.

Overrides StorageInterface::read

2 calls to ConfigSnapshotStorage::read()
ConfigSnapshotStorage::readMultiple in src/ConfigSnapshotStorage.php
Reads configuration data from the storage.
ConfigSnapshotStorage::rename in src/ConfigSnapshotStorage.php
Renames a configuration object in the storage.

File

src/ConfigSnapshotStorage.php, line 109

Class

ConfigSnapshotStorage
Provides a configuration storage saved as simple configuration.

Namespace

Drupal\config_snapshot

Code

public function read($name) {
  if ($item = $this->configSnapshot
    ->getItem($this->collection, $name)) {
    return $item['data'];
  }
  return FALSE;
}