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

Public Member Functions

 __construct (private readonly ResourceCollection $items, int $currentPageNumber=1, int $itemsPerPage=10)
 
 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

ResourceCollection $paginatedItems
 

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 26 of file ResourceCollectionPaginator.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ getAmountOfItemsOnCurrentPage()

TYPO3\CMS\Filelist\Pagination\ResourceCollectionPaginator::getAmountOfItemsOnCurrentPage ( )
protected

Must return the amount of paginated items on the current page

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

Definition at line 57 of file ResourceCollectionPaginator.php.

◆ getPaginatedItems()

TYPO3\CMS\Filelist\Pagination\ResourceCollectionPaginator::getPaginatedItems ( )

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

Implements TYPO3\CMS\Core\Pagination\PaginatorInterface.

Definition at line 42 of file ResourceCollectionPaginator.php.

References TYPO3\CMS\Filelist\Pagination\ResourceCollectionPaginator\$paginatedItems.

◆ getTotalAmountOfItems()

TYPO3\CMS\Filelist\Pagination\ResourceCollectionPaginator::getTotalAmountOfItems ( )
protected

Must return the total amount of all unpaginated items

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

Definition at line 52 of file ResourceCollectionPaginator.php.

◆ updatePaginatedItems()

TYPO3\CMS\Filelist\Pagination\ResourceCollectionPaginator::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 47 of file ResourceCollectionPaginator.php.

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

Member Data Documentation

◆ $paginatedItems

ResourceCollection TYPO3\CMS\Filelist\Pagination\ResourceCollectionPaginator::$paginatedItems
private