diff options
Diffstat (limited to 'app/Pagination')
-rw-r--r-- | app/Pagination/TaskPagination.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Pagination/TaskPagination.php b/app/Pagination/TaskPagination.php index 53e05c13..29706cd5 100644 --- a/app/Pagination/TaskPagination.php +++ b/app/Pagination/TaskPagination.php @@ -36,4 +36,19 @@ class TaskPagination extends Base ->setFormatter($this->taskListFormatter) ->calculateOnlyIf($this->request->getStringParam('pagination') === 'tasks'); } + + public function getDashboardPerProjectPaginator($userId, $method, $max) + { + $query = $this->taskFinderModel->getUserQuery($userId); + $this->hook->reference('pagination:dashboard:task:query', $query); + + return $this->paginator + ->setUrl('DashboardController', $method, array('pagination' => 'tasks', 'user_id' => $userId)) + ->setMax($max) + ->setOrder(TaskModel::TABLE.'.project_id, '.TaskModel::TABLE.'.id') + ->setQuery($query) + ->setFormatter($this->taskListProjectFormatter) + ->calculateOnlyIf($this->request->getStringParam('pagination') === 'tasks'); + } + } |