protected function EntityStorageControllerBase::cacheGet

Gets entities from the static cache.

Parameters

$ids: If not empty, return entities that match these IDs.

Return value

Array of entities from the entity cache.

1 call to EntityStorageControllerBase::cacheGet()

File

drupal/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php, line 119
Contains \Drupal\Core\Entity\EntityStorageControllerBase.

Class

EntityStorageControllerBase
A base entity storage controller class.

Namespace

Drupal\Core\Entity

Code

protected function cacheGet($ids) {
  $entities = array();

  // Load any available entities from the internal cache.
  if ($this->cache && !empty($this->entityCache)) {
    $entities += array_intersect_key($this->entityCache, array_flip($ids));
  }
  return $entities;
}