Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100697839
ManiphestStatusSearchConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 1, 23:46
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Feb 3, 23:46 (2 d)
Engine
blob
Format
Raw Data
Handle
24014846
Attached To
rPH Phabricator
ManiphestStatusSearchConduitAPIMethod.php
View Options
<?php
final
class
ManiphestStatusSearchConduitAPIMethod
extends
ManiphestConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'maniphest.status.search'
;
}
public
function
getMethodSummary
()
{
return
pht
(
'Read information about task statuses.'
);
}
public
function
getMethodDescription
()
{
return
pht
(
'Returns information about the possible statuses for Maniphest '
.
'tasks.'
);
}
protected
function
defineParamTypes
()
{
return
array
();
}
protected
function
defineReturnType
()
{
return
'map<string, wild>'
;
}
public
function
getRequiredScope
()
{
return
self
::
SCOPE_ALWAYS
;
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$config
=
PhabricatorEnv
::
getEnvConfig
(
'maniphest.statuses'
);
$results
=
array
();
foreach
(
$config
as
$code
=>
$status
)
{
$stripped_status
=
array
(
'name'
=>
$status
[
'name'
],
'value'
=>
$code
,
'closed'
=>
!
empty
(
$status
[
'closed'
]),
);
if
(
isset
(
$status
[
'special'
]))
{
$stripped_status
[
'special'
]
=
$status
[
'special'
];
}
$results
[]
=
$stripped_status
;
}
return
array
(
'data'
=>
$results
);
}
}
Event Timeline
Log In to Comment