Added 'pagination:dashboard:subtask:query' to SubtaskPagination.

This commit is contained in:
CoRex
2017-12-02 13:55:42 +01:00
committed by fguillot
parent d5145925a0
commit 45610baa47

View File

@@ -23,13 +23,16 @@ class SubtaskPagination extends Base
*/ */
public function getDashboardPaginator($userId) public function getDashboardPaginator($userId)
{ {
$query = $this->taskFinderModel->getUserQuery($userId);
$this->hook->reference('pagination:dashboard:subtask:query', $query);
return $this->paginator return $this->paginator
->setUrl('DashboardController', 'subtasks', array('user_id' => $userId)) ->setUrl('DashboardController', 'subtasks', array('user_id' => $userId))
->setMax(50) ->setMax(50)
->setOrder(TaskModel::TABLE.'.priority') ->setOrder(TaskModel::TABLE.'.priority')
->setDirection('DESC') ->setDirection('DESC')
->setFormatter($this->taskListSubtaskAssigneeFormatter->withUserId($userId)->withoutEmptyTasks()) ->setFormatter($this->taskListSubtaskAssigneeFormatter->withUserId($userId)->withoutEmptyTasks())
->setQuery($this->taskFinderModel->getUserQuery($userId)) ->setQuery($query)
->calculate(); ->calculate();
} }
} }