W3cubDocs

/Drupal 8

protected function ConfigEntityStorage::setStaticCache

protected ConfigEntityStorage::setStaticCache(array $entities)

Stores entities in the static entity cache.

Parameters

\Drupal\Core\Entity\EntityInterface[] $entities: Entities to store in the cache.

Overrides EntityStorageBase::setStaticCache

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php, line 350

Class

ConfigEntityStorage
Defines the storage class for configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

protected function setStaticCache(array $entities) {
  if ($this->entityType->isStaticallyCacheable()) {
    $config_overrides_key = $this->overrideFree ? '' : implode(':', $this->configFactory->getCacheKeys());
    foreach ($entities as $id => $entity) {
      $this->entities[$id][$config_overrides_key] = $entity;
    }
  }
}

© 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!Entity!ConfigEntityStorage.php/function/ConfigEntityStorage::setStaticCache/8.1.x