[FEATURE] Introduce native pagination for lists
This patch introduces native support for pagination of lists such as arrays or QueryResults of Extbase. The main part of this feature is a new PaginatorInterface that defines a basic set of methods a paginator needs to implement. To enable a quick creation of new paginators, an AbstractPaginator class has been created which holds the main pagination logic while the concrete paginator only needs to take care of the concrete data type handling. The PaginatorInterface and the AbstractPaginator allow the creation of futher paginators like one that supports the doctrine/dbal query builder. It's basically possible to create paginators for all sets of items that are countable and which can be transformed into an iterable sub set of given items. The PaginationInterface will also be the foundation for a new type agnostic pagination ViewHelper. Releases: master Resolves: #89603 Change-Id: I46c712d8112ae7dca6caaf0c9476402f6ea5054a Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62239 Tested-by:Mathias Brodala <mbrodala@pagemachine.de> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Björn Jacob <bjoern.jacob@tritum.de> Tested-by:
Susanne Moog <look@susi.dev> Tested-by:
Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by:
Mathias Brodala <mbrodala@pagemachine.de> Reviewed-by:
Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Daniel Goerz <daniel.goerz@posteo.de>
Showing
- typo3/sysext/core/Classes/Pagination/AbstractPaginator.php 169 additions, 0 deletionstypo3/sysext/core/Classes/Pagination/AbstractPaginator.php
- typo3/sysext/core/Classes/Pagination/ArrayPaginator.php 65 additions, 0 deletionstypo3/sysext/core/Classes/Pagination/ArrayPaginator.php
- typo3/sysext/core/Classes/Pagination/PaginationInterface.php 76 additions, 0 deletionstypo3/sysext/core/Classes/Pagination/PaginationInterface.php
- typo3/sysext/core/Classes/Pagination/PaginatorInterface.php 72 additions, 0 deletionstypo3/sysext/core/Classes/Pagination/PaginatorInterface.php
- typo3/sysext/core/Classes/Pagination/SimplePagination.php 82 additions, 0 deletionstypo3/sysext/core/Classes/Pagination/SimplePagination.php
- typo3/sysext/core/Documentation/Changelog/master/Feature-89603-IntroduceNativePaginationForLists.rst 50 additions, 0 deletions...aster/Feature-89603-IntroduceNativePaginationForLists.rst
- typo3/sysext/core/Tests/Unit/Pagination/ArrayPaginatorTest.php 139 additions, 0 deletions.../sysext/core/Tests/Unit/Pagination/ArrayPaginatorTest.php
- typo3/sysext/core/Tests/Unit/Pagination/SimplePaginationTest.php 126 additions, 0 deletions...ysext/core/Tests/Unit/Pagination/SimplePaginationTest.php
- typo3/sysext/extbase/Classes/Pagination/QueryResultPaginator.php 72 additions, 0 deletions...ysext/extbase/Classes/Pagination/QueryResultPaginator.php
- typo3/sysext/extbase/Tests/Functional/Pagination/QueryResultPaginatorTest.php 157 additions, 0 deletions.../Tests/Functional/Pagination/QueryResultPaginatorTest.php
Please register or sign in to comment