function ConfigFactory::propagateConfigOverrideCacheability

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/ConfigFactory.php \Drupal\Core\Config\ConfigFactory::propagateConfigOverrideCacheability()
  2. 8.9.x core/lib/Drupal/Core/Config/ConfigFactory.php \Drupal\Core\Config\ConfigFactory::propagateConfigOverrideCacheability()
  3. 10 core/lib/Drupal/Core/Config/ConfigFactory.php \Drupal\Core\Config\ConfigFactory::propagateConfigOverrideCacheability()

Propagates cacheability of config overrides to cached config objects.

Parameters

string $cache_key: The key of the cached config object to update.

string $name: The name of the configuration object to construct.

1 call to ConfigFactory::propagateConfigOverrideCacheability()
ConfigFactory::doLoadMultiple in core/lib/Drupal/Core/Config/ConfigFactory.php
Returns a list of configuration objects for the given names.

File

core/lib/Drupal/Core/Config/ConfigFactory.php, line 222

Class

ConfigFactory
Defines the configuration object factory.

Namespace

Drupal\Core\Config

Code

protected function propagateConfigOverrideCacheability($cache_key, $name) {
    foreach ($this->configFactoryOverrides as $override) {
        $this->cache[$cache_key]
            ->addCacheableDependency($override->getCacheableMetadata($name));
    }
}

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