diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php index 6cf82fc..7ee62a0 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php @@ -21,7 +21,8 @@ class ConfigEntityListBuilder extends EntityListBuilder { * {@inheritdoc} */ public function load() { - $entities = $this->storage->loadMultipleOverrideFree(); + $entity_ids = $this->getEntityIds(); + $entities = $this->storage->loadMultipleOverrideFree($entity_ids); // Sort the entities using the entity class's sort() method. // See \Drupal\Core\Config\Entity\ConfigEntityBase::sort(). diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilder.php b/core/lib/Drupal/Core/Entity/EntityListBuilder.php index 3e674a3..7137951 100644 --- a/core/lib/Drupal/Core/Entity/EntityListBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityListBuilder.php @@ -81,12 +81,21 @@ public function getStorage() { * {@inheritdoc} */ public function load() { + $entity_ids = $this->getEntityIds(); + return $this->storage->loadMultiple($entity_ids); + } + + /** + * Loads entity IDs using a pager. + * + * @return array + * An array of entity IDs. + */ + protected function getEntityIds() { $query = $this->getStorage()->getQuery(); - $entity_ids = $query + return $query ->pager($this->limit) ->execute(); - - return $this->storage->loadMultiple($entity_ids); } /**