‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Pagination\PaginatorInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Pagination\PaginatorInterface:
TYPO3\CMS\Core\Pagination\AbstractPaginator TYPO3\CMS\Core\Pagination\ArrayPaginator TYPO3\CMS\Extbase\Pagination\QueryResultPaginator TYPO3\CMS\Filelist\Pagination\ResourceCollectionPaginator TYPO3\CMS\IndexedSearch\Pagination\SlicePaginator TYPO3\CMS\Reactions\Pagination\DemandedArrayPaginator TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator

Public Member Functions

 withItemsPerPage (int $itemsPerPage)
 
 withCurrentPageNumber (int $currentPageNumber)
 
 getPaginatedItems ()
 
 getNumberOfPages ()
 
 getCurrentPageNumber ()
 
 getKeyOfFirstPaginatedItem ()
 
 getKeyOfLastPaginatedItem ()
 

Detailed Description

An interface that defines methods needed to implement a paginator, i.e. an object that handles a set of items and returns a sub set of items, given by a configuration.

Definition at line 24 of file PaginatorInterface.php.

Member Function Documentation

◆ getCurrentPageNumber()

TYPO3\CMS\Core\Pagination\PaginatorInterface::getCurrentPageNumber ( )

Returns the current page number

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

◆ getKeyOfFirstPaginatedItem()

TYPO3\CMS\Core\Pagination\PaginatorInterface::getKeyOfFirstPaginatedItem ( )

Returns the key of the first paginated item

This is useful to display the exact range of items that are available via getPaginatedItems

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

◆ getKeyOfLastPaginatedItem()

TYPO3\CMS\Core\Pagination\PaginatorInterface::getKeyOfLastPaginatedItem ( )

Returns the key of the last paginated item

This is useful to display the exact range of items that are available via getPaginatedItems

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

◆ getNumberOfPages()

TYPO3\CMS\Core\Pagination\PaginatorInterface::getNumberOfPages ( )

Returns the total number of pages, given the total number of non paginated items and the items per page configuration

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

◆ getPaginatedItems()

◆ withCurrentPageNumber()

TYPO3\CMS\Core\Pagination\PaginatorInterface::withCurrentPageNumber ( int  $currentPageNumber)

Sets the current page to calculate paginated items for

Must return a new instance of the Paginator with an updated internal state

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

◆ withItemsPerPage()

TYPO3\CMS\Core\Pagination\PaginatorInterface::withItemsPerPage ( int  $itemsPerPage)

Sets the amount of paginated items per page

Must return a new instance of the Paginator with an updated internal state

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