W3cubDocs

/Drupal 8

public function ConfigCollectionInfo::getCollectionNames

public ConfigCollectionInfo::getCollectionNames($include_default = TRUE)

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!ConfigCollectionInfo.php/function/ConfigCollectionInfo::getCollectionNames/8.1.x