You are here

public function StorageComparer::getAllCollectionNames in Drupal 8

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

Gets the existing collections from both the target and source storage.

Parameters

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

Return value

array An array of existing collection names.

Overrides StorageComparerInterface::getAllCollectionNames

2 calls to StorageComparer::getAllCollectionNames()
StorageComparer::createChangelist in core/lib/Drupal/Core/Config/StorageComparer.php
StorageComparer::hasChanges in core/lib/Drupal/Core/Config/StorageComparer.php
Checks if there are any operations with changes to process.

File

core/lib/Drupal/Core/Config/StorageComparer.php, line 452

Class

StorageComparer
Defines a config storage comparer.

Namespace

Drupal\Core\Config

Code

public function getAllCollectionNames($include_default = TRUE) {
  $collections = array_unique(array_merge($this->sourceStorage
    ->getAllCollectionNames(), $this->targetStorage
    ->getAllCollectionNames()));
  if ($include_default) {
    array_unshift($collections, StorageInterface::DEFAULT_COLLECTION);
  }
  return $collections;
}