Class rex_pager

The rex_pager-class implements all the logic which is necessary to implement some sort of pagination.

Package: redaxo\core
Author: staabm
Located at redaxo/src/core/lib/util/pager.php

Methods summary

public
# __construct( integer $rowsPerPage = 30, string $cursorName = 'start' )

Constructs a rex_pager.

public
# setRowCount( integer $rowCount )

Sets the row count.

public integer
# getRowCount( )

Returns the number of rows for pagination.

public integer
# getPageCount( )

Returns the number of pages which result from the given number of rows and the rows per page.

public integer
# getRowsPerPage( )

Returns the number of rows which will be displayed on a page.

public integer
# getCursor( integer $pageNo = null )

Returns the current pagination position.

public integer
# validateCursor( integer $cursor )

Validates the cursor.

public string
# getCursorName( )

Returns the name of the parameter which is used for pagination.

public integer
# getFirstPage( )

Returns the first page for pagination.

public integer
# getPrevPage( )

Returns the previous page in respect to the current page.

public integer
# getCurrentPage( )

Returns the number of the current page.

public integer
# getNextPage( )

Returns the number of the next page in respect to the current page.

public integer
# getLastPage( )

Return the page number of the last page.

public boolean
# isActivePage( integer $pageNo )

Checks wheter the given page number is the active/current page.