function CachedStorage::getCollectionPrefix

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

Returns a cache ID prefix to use for the collection.

Return value

string The cache ID prefix.

2 calls to CachedStorage::getCollectionPrefix()
CachedStorage::getCacheKey in core/lib/Drupal/Core/Config/CachedStorage.php
Returns a cache key for a configuration name using the collection.
CachedStorage::getCacheKeys in core/lib/Drupal/Core/Config/CachedStorage.php
Returns a cache key map for an array of configuration names.

File

core/lib/Drupal/Core/Config/CachedStorage.php, line 294

Class

CachedStorage
Defines the cached storage.

Namespace

Drupal\Core\Config

Code

protected function getCollectionPrefix() {
    $collection = $this->storage
        ->getCollectionName();
    if ($collection == StorageInterface::DEFAULT_COLLECTION) {
        return '';
    }
    return $collection . ':';
}

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