summaryrefslogtreecommitdiff
path: root/app/Pagination/UserPagination.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Pagination/UserPagination.php')
-rw-r--r--app/Pagination/UserPagination.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/app/Pagination/UserPagination.php b/app/Pagination/UserPagination.php
new file mode 100644
index 00000000..430b7d2f
--- /dev/null
+++ b/app/Pagination/UserPagination.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Kanboard\Pagination;
+
+use Kanboard\Core\Base;
+use Kanboard\Core\Paginator;
+use Kanboard\Model\UserModel;
+
+/**
+ * Class UserPagination
+ *
+ * @package Kanboard\Pagination
+ * @author Frederic Guillot
+ */
+class UserPagination extends Base
+{
+ /**
+ * Get user listing paginator
+ *
+ * @access public
+ * @return Paginator
+ */
+ public function getListingPaginator()
+ {
+ return $this->paginator
+ ->setUrl('UserListController', 'show')
+ ->setMax(30)
+ ->setOrder(UserModel::TABLE.'.username')
+ ->setQuery($this->userModel->getQuery())
+ ->calculate();
+ }
+}