Added methods to determine first/last page
authorAlexander Ebert <ebert@woltlab.com>
Tue, 26 Jun 2012 14:22:45 +0000 (16:22 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 26 Jun 2012 14:22:45 +0000 (16:22 +0200)
wcfsetup/install/files/lib/page/MultipleLinkPage.class.php

index 42656d01afc295a77c6050492a1e6083e75f8662..c1d9a545b9f97972a99f835d0d28bc74661caeda 100644 (file)
@@ -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()
         */