function PagerManager::setPager

Same name in other branches
  1. 9 core/lib/Drupal/Core/Pager/PagerManager.php \Drupal\Core\Pager\PagerManager::setPager()
  2. 8.9.x core/lib/Drupal/Core/Pager/PagerManager.php \Drupal\Core\Pager\PagerManager::setPager()
  3. 10 core/lib/Drupal/Core/Pager/PagerManager.php \Drupal\Core\Pager\PagerManager::setPager()

Saves a pager to the static cache.

Parameters

\Drupal\Core\Pager\Pager $pager: The pager.

int $element: The pager index.

1 call to PagerManager::setPager()
PagerManager::createPager in core/lib/Drupal/Core/Pager/PagerManager.php
Initializes a pager.

File

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

Class

PagerManager
Provides a manager for pagers.

Namespace

Drupal\Core\Pager

Code

protected function setPager(Pager $pager, $element = 0) {
    $this->maxPagerElementId = max($element, $this->maxPagerElementId);
    $this->pagers[$element] = $pager;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.