diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-07-24 12:09:41 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-07-24 12:09:41 -0400 |
commit | 51b2193fc43a25f309a8510b64027d40bf21e12d (patch) | |
tree | 32683ee323de8260b24a2023401b720e56f5f58d /app/Pagination/UserPagination.php | |
parent | 506ebf3bac302a63be7c32a03b872a9eefa689fc (diff) |
Move dashboard pagination into separate classes
Diffstat (limited to 'app/Pagination/UserPagination.php')
-rw-r--r-- | app/Pagination/UserPagination.php | 32 |
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(); + } +} |