You are here

public function ConfigSnapshot::getItem in Config Snapshot 8

Returns an item from the snapshot for a given collection.

Parameters

string $collection: The configuration collection.

string $name: The name of a configuration object.

Return value

array|null The configuration item or NULL if not found.

Overrides ConfigSnapshotInterface::getItem

File

src/Entity/ConfigSnapshot.php, line 120

Class

ConfigSnapshot
Defines the Config snapshot entity.

Namespace

Drupal\config_snapshot\Entity

Code

public function getItem($collection, $name) {
  if (($key = $this
    ->getItemKey($collection, $name)) !== FALSE) {
    return $this->items[$key];
  }
  return NULL;
}