‪TYPO3CMS  ‪main
TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator Class Reference
Inheritance diagram for TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator:
TYPO3\CMS\Core\Pagination\AbstractPaginator TYPO3\CMS\Core\Pagination\PaginatorInterface

Public Member Functions

 __construct (array $items, int $currentPageNumber=1, int $itemsPerPage=10, int $allCount=0)
 
 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
 
int $allCount
 
array $paginatedItems = []
 

Additional Inherited Members

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

Detailed Description

A custom Paginator for dealing with the demand object.

not part of TYPO3's Core API

Todo:
‪should be replaced with the regular ArrayPaginator

Definition at line 28 of file DemandedArrayPaginator.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ getAmountOfItemsOnCurrentPage()

TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator::getAmountOfItemsOnCurrentPage ( )
protected

Must return the amount of paginated items on the current page

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

Definition at line 64 of file DemandedArrayPaginator.php.

◆ getPaginatedItems()

TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator::getPaginatedItems ( )

Returns an iterable, sub set of the original set of items

Implements TYPO3\CMS\Core\Pagination\PaginatorInterface.

Definition at line 49 of file DemandedArrayPaginator.php.

References TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator\$paginatedItems.

◆ getTotalAmountOfItems()

TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator::getTotalAmountOfItems ( )
protected

Must return the total amount of all unpaginated items

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

Definition at line 59 of file DemandedArrayPaginator.php.

References TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator\$allCount.

◆ updatePaginatedItems()

TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator::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 54 of file DemandedArrayPaginator.php.

References TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator\$items.

Member Data Documentation

◆ $allCount

int TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator::$allCount
private

◆ $items

array TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator::$items
private

◆ $paginatedItems

array TYPO3\CMS\Webhooks\Pagination\DemandedArrayPaginator::$paginatedItems = []
private