Make page_count and current accessible from Twig
There are times when it is necessary to show the page_count and current page in Twig templates (for example, "2/6" to mean "page 2 of 6"). This pull request aims to expose variables current, items_per_page, and page_count.
I am not good with making pull requests, so if there is any mistake, please tell me, and I will try my best to fix it. Thanks!
@mahagr , thank you very much for your feedback. I apologize for not adding docblocks in advance, because I wasn't sure which type the variables were in. However, after making sure that all are integers (after casting one double to int because ceil() returns a double), I added proper @return annotations.
I hope this is okay now. If there are any other mistakes, please tell me!
Looks good to me!
@mahagr , thank you very much for your patience. I originally intended to use casts but I was unsure, and the internet misguided me. I apologize.