‪TYPO3CMS  11.5
TYPO3\CMS\Core\Pagination\PaginationInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Pagination\PaginationInterface:
TYPO3\CMS\Core\Pagination\SimplePagination

Public Member Functions

 __construct (PaginatorInterface $paginator)
 
 getPreviousPageNumber ()
 
 getNextPageNumber ()
 
 getFirstPageNumber ()
 
 getLastPageNumber ()
 
 getStartRecordNumber ()
 
 getEndRecordNumber ()
 

Detailed Description

An interface that defines methods needed to implement a pagination

A pagination is an object that takes a paginator and calculates variables to render a pagination for the paginated objects in the given paginator

Definition at line 26 of file PaginationInterface.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Pagination\PaginationInterface::__construct ( PaginatorInterface  $paginator)

Member Function Documentation

◆ getEndRecordNumber()

TYPO3\CMS\Core\Pagination\PaginationInterface::getEndRecordNumber ( )

Must return the human readable index of the last paginated item

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

Implemented in TYPO3\CMS\Core\Pagination\SimplePagination.

◆ getFirstPageNumber()

TYPO3\CMS\Core\Pagination\PaginationInterface::getFirstPageNumber ( )

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

Implemented in TYPO3\CMS\Core\Pagination\SimplePagination.

◆ getLastPageNumber()

TYPO3\CMS\Core\Pagination\PaginationInterface::getLastPageNumber ( )

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

Implemented in TYPO3\CMS\Core\Pagination\SimplePagination.

◆ getNextPageNumber()

TYPO3\CMS\Core\Pagination\PaginationInterface::getNextPageNumber ( )

Must return the next page number

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

Implemented in TYPO3\CMS\Core\Pagination\SimplePagination.

◆ getPreviousPageNumber()

TYPO3\CMS\Core\Pagination\PaginationInterface::getPreviousPageNumber ( )

Must return the previous page number

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

Implemented in TYPO3\CMS\Core\Pagination\SimplePagination.

◆ getStartRecordNumber()

TYPO3\CMS\Core\Pagination\PaginationInterface::getStartRecordNumber ( )

Must return the human readable index of the first paginated item

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

Implemented in TYPO3\CMS\Core\Pagination\SimplePagination.