You are here

public function ConfigSnapshot::clearItem in Config Snapshot 8

Clears 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

\Drupal\config_snapshot\Entity\ConfigSnapshotInterface A config snapshot object for chaining.

Overrides ConfigSnapshotInterface::clearItem

File

src/Entity/ConfigSnapshot.php, line 150

Class

ConfigSnapshot
Defines the Config snapshot entity.

Namespace

Drupal\config_snapshot\Entity

Code

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