Issue Feature Resolved

#106764Change Paginator pre-calculated getters from protected to public, to make the API more useful

S P 05/26/25, 10:23 updated 10/22/26, 17:50

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

  1. Georg Ringer commented and changed status Under Review Resolved done 0 % 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.