SlidingWindowPagination implements PaginationInterface

FinalYes

Table of Contents

Interfaces

PaginationInterface
An interface that defines methods needed to implement a pagination

Properties

$displayRangeEnd  : int
$displayRangeStart  : int
$hasLessPages  : bool
$hasMorePages  : bool
$maximumNumberOfLinks  : int
$paginator  : PaginatorInterface

Methods

__construct()  : mixed
getAllPageNumbers()  : array<string|int, int>
Must return a list of all page numbers.
getDisplayRangeEnd()  : int
getDisplayRangeStart()  : int
getEndRecordNumber()  : int
Must return the human-readable index of the last paginated item
getFirstPageNumber()  : int
Must return the first page number, usually this will return 1
getHasLessPages()  : bool
getHasMorePages()  : bool
getLastPageNumber()  : int
Must return the last page number, usually this will return the total amount of pages
getMaximumNumberOfLinks()  : int
getNextPageNumber()  : int|null
Must return the next page number
getPaginator()  : PaginatorInterface
getPreviousPageNumber()  : int|null
Must return the previous page number
getStartRecordNumber()  : int
Must return the human-readable index of the first paginated item
calculateDisplayRange()  : void

Properties

$displayRangeEnd

protected int $displayRangeEnd = 0

$displayRangeStart

protected int $displayRangeStart = 0

$hasLessPages

protected bool $hasLessPages = false

$hasMorePages

protected bool $hasMorePages = false
protected int $maximumNumberOfLinks = 0

Methods

getAllPageNumbers()

Must return a list of all page numbers.

public getAllPageNumbers() : array<string|int, int>
Return values
array<string|int, int>

getDisplayRangeEnd()

public getDisplayRangeEnd() : int
Return values
int

getDisplayRangeStart()

public getDisplayRangeStart() : int
Return values
int

getEndRecordNumber()

Must return the human-readable index of the last paginated item

public getEndRecordNumber() : int

Example: given a set of 10 total items, 5 items per page and the current page being 2, the end record number is 10.

Page 1: Records 1-5 Page 2: Records 6-10

Return values
int

getFirstPageNumber()

Must return the first page number, usually this will return 1

public getFirstPageNumber() : int
Return values
int

getHasLessPages()

public getHasLessPages() : bool
Return values
bool

getHasMorePages()

public getHasMorePages() : bool
Return values
bool

getLastPageNumber()

Must return the last page number, usually this will return the total amount of pages

public getLastPageNumber() : int
Return values
int
public getMaximumNumberOfLinks() : int
Return values
int

getNextPageNumber()

Must return the next page number

public getNextPageNumber() : int|null

Is allowed to return null to indicate that there is no next page, e.g. when being on the last page

Return values
int|null

getPreviousPageNumber()

Must return the previous page number

public getPreviousPageNumber() : int|null

Is allowed to return null to indicate that there is no previous page, e.g. when being on the first page

Return values
int|null

getStartRecordNumber()

Must return the human-readable index of the first paginated item

public getStartRecordNumber() : int

Example: given a set of 10 total items, 5 items per page and the current page being 2, the start record number is 6:

Page 1: Records 1-5 Page 2: Records 6-10

Return values
int

calculateDisplayRange()

protected calculateDisplayRange() : void

        
On this page

Search results