You are here

public function ConfigCollectionInfo::getCollectionNames in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/ConfigCollectionInfo.php \Drupal\Core\Config\ConfigCollectionInfo::getCollectionNames()
  2. 9 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;
}