You are here

public function Pagination::getPageVar in Pagination (Node) 7

Same name and namespace in other branches
  1. 6 pagination.module \Pagination::getPageVar()

Returns the value of $_GET['page']

Return value

An integer value corresponding to the current page number, or "show" if showing the full page.

2 calls to Pagination::getPageVar()
Pagination::getPager in includes/Pagination.inc
Return a themed pager (Drupal default).
Pagination::getToc in includes/Pagination.inc
Return a themed table of contents.

File

includes/Pagination.inc, line 160

Class

Pagination
Handles all the pagination logic

Code

public function getPageVar() {
  $page = isset($_GET['page']) ? $_GET['page'] : 0;
  $page = $page > 0 ? --$page : $page;
  return $page;
}