-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add methods to get page numbers in PagerRenderer #4188
feat: add methods to get page numbers in PagerRenderer #4188
Conversation
To create the same link as the CI3 link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making it more sound natural? Like getFirstPageNumber, getCurrentPageNumber, getLastPageNumber. Then add another for getPreviousPageNumber.
Or better yet, remove the Number? getFirstPage, getLastPage etc.
We already have methods in this convention and they all return an URL, so it might be confusing for users. But your idea of having getFirstPageNumber, getCurrentPageNumber, getLastPageNumber sounds better to me - more natural. @kenjis One thing I don't like is this: $pager->getPageNumberCurrent() - 1 We should add a method |
I changed the method names, and added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I think this is a better solution than the magic getter. Please implement @paulbalandan 's assertion changes, then I think we're set.
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
@MGatner Done! Thanks for all. |
Description
Supersedes #4141
Add methods to get page numbers in PagerRenderer.
To generate Pager HTML that is the same as CI3's.
The template would be like this:
Checklist: