function SqlContentEntityStorage::doLoadMultiple

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doLoadMultiple()
  2. 10 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doLoadMultiple()
  3. 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doLoadMultiple()

Overrides EntityStorageBase::doLoadMultiple

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 409

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

protected function doLoadMultiple(array $ids = NULL) {
    // Attempt to load entities from the persistent cache. This will remove IDs
    // that were loaded from $ids.
    $entities_from_cache = $this->getFromPersistentCache($ids);
    // Load any remaining entities from the database.
    if ($entities_from_storage = $this->getFromStorage($ids)) {
        $this->invokeStorageLoadHook($entities_from_storage);
        $this->setPersistentCache($entities_from_storage);
    }
    return $entities_from_cache + $entities_from_storage;
}

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