diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilder.php b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
index ab29a0b..f7bcf7a 100644
--- a/core/lib/Drupal/Core/Entity/EntityListBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
@@ -78,14 +78,20 @@ public function getStorage() {
}
/**
- * {@inheritdoc}
+ * Get current page from the pager.
*/
- public function load() {
+ protected function getCurrentPage() {
$count_query = $this->getStorage()->getQuery();
$total_items = $count_query->count()->execute();
- $current_page = pager_default_initialize($total_items, $this->limit, 0);
+ 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)
diff --git a/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php b/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php
index 9d94468..e02c46f 100644
--- a/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php
+++ b/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php
@@ -31,10 +31,10 @@ protected function getFilterLabels() {
* {@inheritdoc}
*/
public function render() {
- $table = parent::render();
+ $build = parent::render();
$filter = $this->getFilterLabels();
- usort($table['#rows'], array($this, 'sortRows'));
+ usort($build['table']['#rows'], array($this, 'sortRows'));
$build['filters'] = array(
'#type' => 'container',
@@ -56,7 +56,6 @@ public function render() {
),
);
- $build['table'] = $table;
$build['table']['#attributes']['class'][] = 'config-translation-entity-list';
$build['#attached']['library'][] = 'system/drupal.system.modules';
diff --git a/core/modules/taxonomy/src/VocabularyListBuilder.php b/core/modules/taxonomy/src/VocabularyListBuilder.php
index bb385df..013d900 100644
--- a/core/modules/taxonomy/src/VocabularyListBuilder.php
+++ b/core/modules/taxonomy/src/VocabularyListBuilder.php
@@ -82,7 +82,7 @@ public function render() {
unset($this->weightKey);
}
$build = parent::render();
- $build['#empty'] = t('No vocabularies available. Add vocabulary.', array('@link' => \Drupal::url('entity.taxonomy_vocabulary.add_form')));
+ $build['table']['#empty'] = t('No vocabularies available. Add vocabulary.', array('@link' => \Drupal::url('entity.taxonomy_vocabulary.add_form')));
return $build;
}