Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104531724
ConduitAPI_maniphest_info_Method.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
Mon, Mar 10, 05:44
Size
888 B
Mime Type
text/x-php
Expires
Wed, Mar 12, 05:44 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24806745
Attached To
rPH Phabricator
ConduitAPI_maniphest_info_Method.php
View Options
<?php
final
class
ConduitAPI_maniphest_info_Method
extends
ConduitAPI_maniphest_Method
{
public
function
getMethodDescription
()
{
return
'Retrieve information about a Maniphest task, given its id.'
;
}
public
function
defineParamTypes
()
{
return
array
(
'task_id'
=>
'required id'
,
);
}
public
function
defineReturnType
()
{
return
'nonempty dict'
;
}
public
function
defineErrorTypes
()
{
return
array
(
'ERR_BAD_TASK'
=>
'No such maniphest task exists'
,
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$task_id
=
$request
->
getValue
(
'task_id'
);
$task
=
id
(
new
ManiphestTaskQuery
())
->
setViewer
(
$request
->
getUser
())
->
withIDs
(
array
(
$task_id
))
->
executeOne
();
if
(!
$task
)
{
throw
new
ConduitException
(
'ERR_BAD_TASK'
);
}
return
$this
->
buildTaskInfoDictionary
(
$task
);
}
}
Event Timeline
Log In to Comment