You are here

public function PagerManager::getPager in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Pager/PagerManager.php \Drupal\Core\Pager\PagerManager::getPager()

Gets a pager from the static cache.

Parameters

int $element: The pager element index.

Return value

\Drupal\Core\Pager\Pager|null The pager, or null if not found.

Overrides PagerManagerInterface::getPager

1 call to PagerManager::getPager()
PagerManager::getUpdatedParameters in core/lib/Drupal/Core/Pager/PagerManager.php
Gets the URL query parameter array of a pager link.

File

core/lib/Drupal/Core/Pager/PagerManager.php, line 65

Class

PagerManager
Provides a manager for pagers.

Namespace

Drupal\Core\Pager

Code

public function getPager($element = 0) {
  return isset($this->pagers[$element]) ? $this->pagers[$element] : NULL;
}