1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 11:12:42 +01:00
phorge-phorge/src/applications/maniphest/conduit/ManiphestQueryStatusesConduitAPIMethod.php
Joshua Spence 36e2d02d6e phtize all the things
Summary: `pht`ize a whole bunch of strings in rP.

Test Plan: Intense eyeballing.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12797
2015-05-22 21:16:39 +10:00

36 lines
1.1 KiB
PHP

<?php
final class ManiphestQueryStatusesConduitAPIMethod
extends ManiphestConduitAPIMethod {
public function getAPIMethodName() {
return 'maniphest.querystatuses';
}
public function getMethodDescription() {
return pht(
'Retrieve information about possible Maniphest task status values.');
}
protected function defineParamTypes() {
return array();
}
protected function defineReturnType() {
return 'nonempty dict<string, wild>';
}
protected function execute(ConduitAPIRequest $request) {
$results = array(
'defaultStatus' => ManiphestTaskStatus::getDefaultStatus(),
'defaultClosedStatus' => ManiphestTaskStatus::getDefaultClosedStatus(),
'duplicateStatus' => ManiphestTaskStatus::getDuplicateStatus(),
'openStatuses' => ManiphestTaskStatus::getOpenStatusConstants(),
'closedStatuses' => ManiphestTaskStatus::getClosedStatusConstants(),
'allStatuses' => array_keys(ManiphestTaskStatus::getTaskStatusMap()),
'statusMap' => ManiphestTaskStatus::getTaskStatusMap(),
);
return $results;
}
}