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.'.id') ->setQuery($query) ->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'); } }