Project

General

Profile

Actions

Feature #102196

open

SimplePagination: total number of items

Added by Philipp Kitzberger about 1 year ago. Updated 4 months ago.

Status:
Needs Feedback
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2023-10-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
On Location Sprint

Description

It seems impossible to me to determine the total number of items from the current implementation of SimplePagination.
There's all sort of getters that use the objects paginator (ArrayPaginator or QueryResultPaginator) to ask for its properties:
  • getPreviousPageNumber() calling
    • ->paginator->getCurrentPageNumber() and
    • ->paginator->getNumberOfPages()
  • getNextPageNumber() calling
    • ->paginator->getCurrentPageNumber() and
    • ->paginator->getNumberOfPages()
  • getLastPageNumber() calling
    • ->paginator->getNumberOfPages()
  • getStartRecordNumber() calling
    • ->paginator->getCurrentPageNumber() and
    • ->paginator->getNumberOfPages()
  • getEndRecordNumber() calling
    • ->paginator->getCurrentPageNumber() and
    • ->paginator->getNumberOfPages()

But no method to get the total number of records. So displaying a text like this is not possible:

Here's 10 out of a total of 321 records


Files

TER-example.png (24.9 KB) TER-example.png Marc Willmann, 2024-08-01 19:35
Actions

Also available in: Atom PDF