diff --git a/wire/core/PaginatedArray.php b/wire/core/PaginatedArray.php index cdefdc6a..910275f0 100644 --- a/wire/core/PaginatedArray.php +++ b/wire/core/PaginatedArray.php @@ -138,6 +138,30 @@ class PaginatedArray extends WireArray implements WirePaginatable { return $this->numStart; } + /** + * Is there a next pagination containing more items in this PaginatedArray after the current one? + * + * #pw-group-other + * + * @return int + * + */ + public function hasNext() { + return $this->getStart() + $this->count() < $this->getTotal(); + } + + /** + * Is there a previous pagination before the current one? + * + * #pw-group-other + * + * @return bool + * + */ + public function hasPrev() { + return $this->getStart() > 0; + } + /** * Get a property of the PageArray *