‪TYPO3CMS  11.5
TYPO3\CMS\Core\Pagination\ArrayPaginator Class Reference
Inheritance diagram for TYPO3\CMS\Core\Pagination\ArrayPaginator:
TYPO3\CMS\Core\Pagination\AbstractPaginator TYPO3\CMS\Core\Pagination\PaginatorInterface

Public Member Functions

 __construct (array $items, int $currentPageNumber=1, int $itemsPerPage=10)
 
iterable array getPaginatedItems ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Pagination\AbstractPaginator
 withItemsPerPage (int $itemsPerPage)
 
 withCurrentPageNumber (int $currentPageNumber)
 
 getNumberOfPages ()
 
 getCurrentPageNumber ()
 
 getKeyOfFirstPaginatedItem ()
 
 getKeyOfLastPaginatedItem ()
 

Protected Member Functions

 updatePaginatedItems (int $itemsPerPage, int $offset)
 
 getTotalAmountOfItems ()
 
 getAmountOfItemsOnCurrentPage ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Pagination\AbstractPaginator
 hasItemsOnCurrentPage ()
 
 updateInternalState ()
 
 setItemsPerPage (int $itemsPerPage)
 
 setCurrentPageNumber (int $currentPageNumber)
 

Private Attributes

array $items
 
array $paginatedItems = array( )
 

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Pagination\AbstractPaginator
int $numberOfPages = 1
 
int $keyOfFirstPaginatedItem = 0
 
int $keyOfLastPaginatedItem = 0
 

Detailed Description

Definition at line 20 of file ArrayPaginator.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ getAmountOfItemsOnCurrentPage()

TYPO3\CMS\Core\Pagination\ArrayPaginator::getAmountOfItemsOnCurrentPage ( )
protected

Must return the amount of paginated items on the current page

Reimplemented from TYPO3\CMS\Core\Pagination\AbstractPaginator.

Definition at line 60 of file ArrayPaginator.php.

◆ getPaginatedItems()

iterable array TYPO3\CMS\Core\Pagination\ArrayPaginator::getPaginatedItems ( )
Returns
‪iterable|array

Implements TYPO3\CMS\Core\Pagination\PaginatorInterface.

Definition at line 45 of file ArrayPaginator.php.

References TYPO3\CMS\Core\Pagination\ArrayPaginator\$paginatedItems.

◆ getTotalAmountOfItems()

TYPO3\CMS\Core\Pagination\ArrayPaginator::getTotalAmountOfItems ( )
protected

Must return the total amount of all unpaginated items

Reimplemented from TYPO3\CMS\Core\Pagination\AbstractPaginator.

Definition at line 55 of file ArrayPaginator.php.

◆ updatePaginatedItems()

TYPO3\CMS\Core\Pagination\ArrayPaginator::updatePaginatedItems ( int  $itemsPerPage,
int  $offset 
)
protected

Must update the paginated items, i.e. the subset of all items, limited and defined by the given amount of items per page and offset

Reimplemented from TYPO3\CMS\Core\Pagination\AbstractPaginator.

Definition at line 50 of file ArrayPaginator.php.

References TYPO3\CMS\Core\Pagination\AbstractPaginator\$itemsPerPage.

Member Data Documentation

◆ $items

array TYPO3\CMS\Core\Pagination\ArrayPaginator::$items
private

◆ $paginatedItems

array TYPO3\CMS\Core\Pagination\ArrayPaginator::$paginatedItems = array( )
private