getBaseURI().'task/create/'; } public function getEventListeners() { return array( new ManiphestPeopleMenuEventListener(), ); } public function getRemarkupRules() { return array( new ManiphestRemarkupRule(), ); } public function getRoutes() { return array( '/T(?P[1-9]\d*)' => 'ManiphestTaskDetailController', '/maniphest/' => array( '' => 'ManiphestTaskListController', 'view/(?P\w+)/' => 'ManiphestTaskListController', 'report/(?:(?P\w+)/)?' => 'ManiphestReportController', 'batch/' => 'ManiphestBatchEditController', 'task/' => array( 'create/' => 'ManiphestTaskEditController', 'edit/(?P[1-9]\d*)/' => 'ManiphestTaskEditController', 'descriptionchange/(?:(?P[1-9]\d*)/)?' => 'ManiphestTaskDescriptionChangeController', 'descriptionpreview/' => 'ManiphestTaskDescriptionPreviewController', ), 'transaction/' => array( 'save/' => 'ManiphestTransactionSaveController', 'preview/(?P[1-9]\d*)/' => 'ManiphestTransactionPreviewController', ), 'export/(?P[^/]+)/' => 'ManiphestExportController', 'subpriority/' => 'ManiphestSubpriorityController', 'custom/' => array( '' => 'ManiphestSavedQueryListController', 'edit/(?:(?P[1-9]\d*)/)?' => 'ManiphestSavedQueryEditController', 'delete/(?P[1-9]\d*)/' => 'ManiphestSavedQueryDeleteController', ), ), ); } public function loadStatus(PhabricatorUser $user) { $status = array(); $query = id(new ManiphestTaskQuery()) ->withStatus(ManiphestTaskQuery::STATUS_OPEN) ->withPriority(ManiphestTaskPriority::PRIORITY_UNBREAK_NOW) ->setLimit(1) ->setCalculateRows(true); $query->execute(); $count = $query->getRowCount(); $type = PhabricatorApplicationStatusView::TYPE_NEEDS_ATTENTION; $status[] = id(new PhabricatorApplicationStatusView()) ->setType($type) ->setText(pht('%d Unbreak Now Task(s)!', $count)) ->setCount($count); $query = id(new ManiphestTaskQuery()) ->withStatus(ManiphestTaskQuery::STATUS_OPEN) ->withOwners(array($user->getPHID())) ->setLimit(1) ->setCalculateRows(true); $query->execute(); $count = $query->getRowCount(); $type = PhabricatorApplicationStatusView::TYPE_WARNING; $status[] = id(new PhabricatorApplicationStatusView()) ->setType($type) ->setText(pht('%d Assigned Task(s)', $count)) ->setCount($count); return $status; } }