Added 'pagination:dashboard:task:query' to DashboardPagination.

This commit is contained in:
CoRex 2017-12-02 00:56:45 +01:00 committed by fguillot
parent b4c0834511
commit 7da4c943b8
1 changed files with 5 additions and 1 deletions

View File

@ -27,13 +27,17 @@ class DashboardPagination extends Base
$projects = $this->projectUserRoleModel->getActiveProjectsByUser($userId);
foreach ($projects as $projectId => $projectName) {
$query = $this->taskFinderModel->getUserQuery($userId)->eq(ProjectModel::TABLE.'.id', $projectId);
$this->hook->reference('pagination:dashboard:task:query', $query);
$paginator = $this->paginator
->setUrl('DashboardController', 'show', array('user_id' => $userId))
->setMax(50)
->setOrder(TaskModel::TABLE.'.priority')
->setDirection('DESC')
->setFormatter($this->taskListSubtaskAssigneeFormatter->withUserId($userId))
->setQuery($this->taskFinderModel->getUserQuery($userId)->eq(ProjectModel::TABLE.'.id', $projectId))
->setQuery($query)
->calculate();
if ($paginator->getTotal() > 0) {