#106764Change Paginator pre-calculated getters from protected to public, to make the API more useful
Description
The AbstractPaginator has this:
abstract protected function getTotalAmountOfItems(): int;
abstract protected function getAmountOfItemsOnCurrentPage(): int;
I regularly need this information to be displayed/evaluated. And because they are currently protected I can not retrieve them from the Paginators, but for example have to fire an additional SQL count(*) query to get the total count or pass the already-counted paginatedItems through f:count() again. Or needing to write a copy-paste custom paginator having custom copy-paste (but public) getters just for these already-existing values – which is cumbersome (the core-provided Paginators are even final…) and does not feel right.
There’s no reason to make these side-effect-free pure information-getter methods protected. Please make them public.
Reviews 2
History 26
-
Garvin Hicking changed category 05/26/25, 18:36
-
Gerrit Code Review pushed patch set 1 for main to change 96178 status
NewUnder Review 09/29/26, 19:37 -
Gerrit Code Review pushed patch set 2 for main to change 96178 10/10/26, 09:14
-
Gerrit Code Review pushed patch set 3 for main to change 96178 10/22/26, 15:50
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97022 10/22/26, 16:50
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % 10/22/26, 17:50
Applied in changeset commit:9332036d5e913885e423bf624f518f89570d2123.