function MemoryStorage::getAllCollectionNames

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Config/MemoryStorage.php \Drupal\Core\Config\MemoryStorage::getAllCollectionNames()
  2. 8.9.x core/lib/Drupal/Core/Config/MemoryStorage.php \Drupal\Core\Config\MemoryStorage::getAllCollectionNames()
  3. 10 core/lib/Drupal/Core/Config/MemoryStorage.php \Drupal\Core\Config\MemoryStorage::getAllCollectionNames()

Overrides StorageInterface::getAllCollectionNames

File

core/lib/Drupal/Core/Config/MemoryStorage.php, line 167

Class

MemoryStorage
Provides an in memory configuration storage.

Namespace

Drupal\Core\Config

Code

public function getAllCollectionNames() {
    $collection_names = [];
    foreach ($this->config as $collection_name => $data) {
        // Exclude the default collection and empty collections.
        if ($collection_name !== StorageInterface::DEFAULT_COLLECTION && !empty($data)) {
            $collection_names[] = $collection_name;
        }
    }
    sort($collection_names);
    return $collection_names;
}

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