From 375ad464db13218db6eb2ed94fe59f62cd340ffd Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 5 Mar 2012 12:12:36 +0100 Subject: [PATCH] ENHANCEMENT GridFieldPaginatior->itemsPerPage accessors --- forms/gridfield/GridFieldPaginator.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/forms/gridfield/GridFieldPaginator.php b/forms/gridfield/GridFieldPaginator.php index bd3125893..d369ffc08 100755 --- a/forms/gridfield/GridFieldPaginator.php +++ b/forms/gridfield/GridFieldPaginator.php @@ -139,6 +139,21 @@ class GridFieldPaginator implements GridField_HTMLProvider, GridField_DataManipu ); } + /** + * @param Int + */ + public function setItemsPerPage($num) { + $this->itemsPerPage = $num; + return $this; + } + + /** + * @return Int + */ + public function getItemsPerPage() { + return $this->itemsPerPage; + } + /** Duck check to see if list support methods we need to paginate */ protected function getListPaginatable(SS_List $list) { // If no list yet, not paginatable