public function SplitCollectionStorage::getAllCollectionNames in Configuration Split 2.0.x
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
File
- src/
Config/ SplitCollectionStorage.php, line 134
Class
- SplitCollectionStorage
- A config storage that lives in a collection of another config storage.
Namespace
Drupal\config_split\ConfigCode
public function getAllCollectionNames() {
return array_values(array_filter(array_map(function ($c) {
$prefix = static::PREFIX . $this->name . '.';
if (strpos($c, $prefix) !== 0) {
// If the underlying storage has collections that don't concern us,
// they will be filtered out, including the default collection.
return FALSE;
}
return substr($c, strlen($prefix));
}, $this->storage
->getAllCollectionNames())));
}