diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php index 597303e837..502900b87d 100644 --- a/core/modules/taxonomy/src/Form/OverviewTerms.php +++ b/core/modules/taxonomy/src/Form/OverviewTerms.php @@ -147,10 +147,6 @@ public function getFormId() { * The form structure. */ public function buildForm(array $form, FormStateInterface $form_state, VocabularyInterface $taxonomy_vocabulary = NULL) { - // @todo Remove global variables when https://www.drupal.org/node/2044435 is - // in. - global $pager_page_array, $pager_total, $pager_total_items; - $form_state->set(['taxonomy', 'vocabulary'], $taxonomy_vocabulary); $vocabulary_hierarchy = $this->storageController->getVocabularyHierarchyType($taxonomy_vocabulary->id()); $parent_fields = FALSE; @@ -243,9 +239,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular // Because we didn't use a pager query, set the necessary pager variables. $total_entries = $before_entries + $page_entries + $after_entries; - $pager_total_items[0] = $total_entries; - $pager_page_array[0] = $page; - $pager_total[0] = ceil($total_entries / $page_increment); + $this->pagerManager->createPager($total_entries, $page_increment); // If this form was already submitted once, it's probably hit a validation // error. Ensure the form is rebuilt in the same order as the user diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 66257df04b..f65eec2e46 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -1025,7 +1025,6 @@ function template_preprocess_views_exposed_form(&$variables) { * exposed input. */ function template_preprocess_views_mini_pager(&$variables) { - /* @var $pager_manager \Drupal\Core\Pager\PagerManagerInterface */ $pager_manager = \Drupal::service('pager.manager');