EntityStorageBase::setStaticCache

protected EntityStorageBase::setStaticCache(array $entities)

Stores entities in the static entity cache.

Parameters

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

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 150

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

1
2
3
4
5
protected function setStaticCache(array $entities) {
  if ($this->entityType->isStaticallyCacheable()) {
    $this->entities += $entities;
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.