You are here

protected function ConfigSyncActiveStoragesTrait::getActiveStorages in Configuration Synchronizer 8.2

Gets the configuration storage that provides the active configuration.

Parameters

string $collection: (optional) The configuration collection. Defaults to the default collection.

Return value

\Drupal\Core\Config\StorageInterface The configuration storage that provides the default configuration.

1 call to ConfigSyncActiveStoragesTrait::getActiveStorages()
ConfigSyncLister::getExtensionChangelist in src/ConfigSyncLister.php
Returns a change list for a given module or theme.

File

src/ConfigSyncActiveStoragesTrait.php, line 29

Class

ConfigSyncActiveStoragesTrait
Provides a utility method for fetching the active storage by collection.

Namespace

Drupal\config_sync

Code

protected function getActiveStorages($collection = StorageInterface::DEFAULT_COLLECTION) {
  if (!isset($this->activeStorages[$collection])) {
    $this->activeStorages[$collection] = reset($this->activeStorages)
      ->createCollection($collection);
  }
  return $this->activeStorages[$collection];
}