From 0c5a43ac9fb1d872566df87019b3cbadc2fdc34f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 26 Jun 2012 16:22:45 +0200 Subject: [PATCH] Added methods to determine first/last page --- .../files/lib/page/MultipleLinkPage.class.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php b/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php index 42656d01af..c1d9a545b9 100644 --- a/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php +++ b/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php @@ -183,6 +183,24 @@ abstract class MultipleLinkPage extends AbstractPage { return $this->objectList->countObjects(); } + /** + * Returns true, if current page is the first page. + * + * @return boolean + */ + public function isFirstPage() { + return ($this->pageNo == 1); + } + + /** + * Returns true, if current page is the last page. + * + * @return boolean + */ + public function isLastPage() { + return ($this->items == $this->endIndex); + } + /** * @see wcf\page\IPage::assignVariables() */ -- 2.20.1