function MemoryStorage::getAllCollectionNames

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

Overrides StorageInterface::getAllCollectionNames

File

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

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.