function ConfigCollectionInfo::getCollectionNames

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/ConfigCollectionInfo.php \Drupal\Core\Config\ConfigCollectionInfo::getCollectionNames()
  2. 8.9.x core/lib/Drupal/Core/Config/ConfigCollectionInfo.php \Drupal\Core\Config\ConfigCollectionInfo::getCollectionNames()
  3. 11.x core/lib/Drupal/Core/Config/ConfigCollectionInfo.php \Drupal\Core\Config\ConfigCollectionInfo::getCollectionNames()

Gets the list of possible collection names.

Parameters

bool $include_default: (Optional) Include the default collection. Defaults to TRUE.

Return value

array The list of possible collection names.

File

core/lib/Drupal/Core/Config/ConfigCollectionInfo.php, line 51

Class

ConfigCollectionInfo
Gets information on all the possible configuration collections.

Namespace

Drupal\Core\Config

Code

public function getCollectionNames($include_default = TRUE) {
    $collection_names = array_keys($this->collections);
    sort($collection_names);
    if ($include_default) {
        array_unshift($collection_names, StorageInterface::DEFAULT_COLLECTION);
    }
    return $collection_names;
}

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