diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilder.php b/core/lib/Drupal/Core/Entity/EntityListBuilder.php index f7bcf7a..3e674a3 100644 --- a/core/lib/Drupal/Core/Entity/EntityListBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityListBuilder.php @@ -78,23 +78,12 @@ public function getStorage() { } /** - * Get current page from the pager. - */ - protected function getCurrentPage() { - $count_query = $this->getStorage()->getQuery(); - $total_items = $count_query->count()->execute(); - - return pager_default_initialize($total_items, $this->limit, 0); - } - - /** * {@inheritdoc} */ public function load() { - $current_page = $this->getCurrentPage(); $query = $this->getStorage()->getQuery(); $entity_ids = $query - ->range($current_page * $this->limit, $this->limit) + ->pager($this->limit) ->execute(); return $this->storage->loadMultiple($entity_ids);