You are here

public function SettableStorageComparer::setTargetStorage in Configuration Synchronizer 8.2

Sets the target storage used to discover configuration changes.

Parameters

\Drupal\Core\Config\StorageInterface $storage:

Return value

$this

File

src/Config/SettableStorageComparer.php, line 44

Class

SettableStorageComparer
Defines a settable config storage comparer.

Namespace

Drupal\config_sync\Config

Code

public function setTargetStorage(StorageInterface $storage) {

  // Reset the static configuration data cache.
  $this->targetCacheStorage
    ->deleteAll();
  $this->targetNames = [];
  $this->targetStorage = new CachedStorage($storage, $this->targetCacheStorage);
  $this->changelist = [
    StorageInterface::DEFAULT_COLLECTION => $this
      ->getEmptyChangelist(),
  ];
  return $this;
}