protected function DatabaseStorageController::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 DatabaseStorageController::cacheGet()

File

drupal/core/lib/Drupal/Core/Entity/DatabaseStorageController.php, line 407
Definition of Drupal\Core\Entity\DatabaseStorageController.

Class

DatabaseStorageController
Defines a base entity controller class.

Namespace

Drupal\Core\Entity

Code

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

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