From: Alexander Ebert Date: Tue, 26 Jun 2012 14:22:45 +0000 (+0200) Subject: Added methods to determine first/last page X-Git-Tag: 2.0.0_Beta_1~1047 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c5a43ac9fb1d872566df87019b3cbadc2fdc34f;p=GitHub%2FWoltLab%2FWCF.git Added methods to determine first/last page --- 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() */