3 final class ManiphestStatusSearchConduitAPIMethod
4 extends ManiphestConduitAPIMethod
{
6 public function getAPIMethodName() {
7 return 'maniphest.status.search';
10 public function getMethodSummary() {
11 return pht('Read information about task statuses.');
14 public function getMethodDescription() {
16 'Returns information about the possible statuses for Maniphest '.
20 protected function defineParamTypes() {
24 protected function defineReturnType() {
25 return 'map<string, wild>';
28 public function getRequiredScope() {
29 return self
::SCOPE_ALWAYS
;
32 protected function execute(ConduitAPIRequest
$request) {
33 $config = PhabricatorEnv
::getEnvConfig('maniphest.statuses');
35 foreach ($config as $code => $status) {
36 $stripped_status = array(
37 'name' => $status['name'],
39 'closed' => !empty($status['closed']),
42 if (isset($status['special'])) {
43 $stripped_status['special'] = $status['special'];
46 $results[] = $stripped_status;
49 return array('data' => $results);