function PagerParameters::getPagerParameter

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

Overrides PagerParametersInterface::getPagerParameter

1 call to PagerParameters::getPagerParameter()
PagerParameters::getPagerQuery in core/lib/Drupal/Core/Pager/PagerParameters.php
Gets the request query parameter.

File

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

Class

PagerParameters
Provides pager information contained within the current request.

Namespace

Drupal\Core\Pager

Code

public function getPagerParameter() {
    $request = $this->requestStack
        ->getCurrentRequest();
    if ($request) {
        return $request->query
            ->get('page', '');
    }
    return '';
}

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