You are here

public function PagerParameters::getPagerQuery in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Pager/PagerParameters.php \Drupal\Core\Pager\PagerParameters::getPagerQuery()
  2. 10 core/lib/Drupal/Core/Pager/PagerParameters.php \Drupal\Core\Pager\PagerParameters::getPagerQuery()

Gets the request query parameter.

Return value

int[] Array of pagers. Keys are integers which are the element ID. Values are the zero-based current page from the request. The first page is 0, the second page is 1, etc.

Overrides PagerParametersInterface::getPagerQuery

1 call to PagerParameters::getPagerQuery()
PagerParameters::findPage in core/lib/Drupal/Core/Pager/PagerParameters.php
Returns the current page being requested for display within a pager.

File

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

Class

PagerParameters
Provides pager information contained within the current request.

Namespace

Drupal\Core\Pager

Code

public function getPagerQuery() {
  $query = $this
    ->getPagerParameter();
  return !empty($query) ? explode(',', $query) : [];
}