#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 <span data-processor="relativetime" data-value="2025-05-26T18:36:38+00:00" > 05/26/25, 18:36 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96178 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-29T19:37:16+00:00" > 09/29/26, 19:37 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96178 <span data-processor="relativetime" data-value="2026-10-10T09:14:23+00:00" > 10/10/26, 09:14 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96178 <span data-processor="relativetime" data-value="2026-10-22T15:50:36+00:00" > 10/22/26, 15:50 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97022 <span data-processor="relativetime" data-value="2026-10-22T16:50:24+00:00" > 10/22/26, 16:50 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-22T17:50:10+00:00" > 10/22/26, 17:50 </span>
Applied in changeset commit:9332036d5e913885e423bf624f518f89570d2123.