function PagerParameters::findPage

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Pager/PagerParameters.php \Drupal\Core\Pager\PagerParameters::findPage()
  2. 10 core/lib/Drupal/Core/Pager/PagerParameters.php \Drupal\Core\Pager\PagerParameters::findPage()
  3. 11.x core/lib/Drupal/Core/Pager/PagerParameters.php \Drupal\Core\Pager\PagerParameters::findPage()

Overrides PagerParametersInterface::findPage

File

core/lib/Drupal/Core/Pager/PagerParameters.php, line 48

Class

PagerParameters
Provides pager information contained within the current request.

Namespace

Drupal\Core\Pager

Code

public function findPage($pager_id = 0) {
    $pages = $this->getPagerQuery();
    return (int) ($pages[$pager_id] ?? 0);
}

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