function CheckpointStorage::getAllCollectionNames

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Config/Checkpoint/CheckpointStorage.php \Drupal\Core\Config\Checkpoint\CheckpointStorage::getAllCollectionNames()

Gets the existing collections.

A configuration storage can contain multiple sets of configuration objects in partitioned collections. The collection key name identifies the current collection used.

Return value

array An array of existing collection names.

Overrides StorageInterface::getAllCollectionNames

1 call to CheckpointStorage::getAllCollectionNames()
CheckpointStorage::checkpoint in core/lib/Drupal/Core/Config/Checkpoint/CheckpointStorage.php
Creates a checkpoint, if required, and returns the active checkpoint.

File

core/lib/Drupal/Core/Config/Checkpoint/CheckpointStorage.php, line 231

Class

CheckpointStorage
Provides a config storage that can make checkpoints.

Namespace

Drupal\Core\Config\Checkpoint

Code

public function getAllCollectionNames() {
  $names = [];
  foreach ($this->getCheckpointsToReadFrom() as $checkpoint) {
    $names = array_merge($names, $this->getKeyValue($checkpoint->id, StorageInterface::DEFAULT_COLLECTION)
      ->get(static::CONFIG_COLLECTION_KEY, []));
  }
  return array_unique(array_merge($this->activeStorage
    ->getAllCollectionNames(), $names));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.