Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F475357
ManiphestInfoConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ManiphestInfoConduitAPIMethod.php
View Options
<?php
final
class
ManiphestInfoConduitAPIMethod
extends
ManiphestConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'maniphest.info'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Retrieve information about a Maniphest task, given its ID.'
);
}
protected
function
defineParamTypes
()
{
return
array
(
'task_id'
=>
'required id'
,
);
}
protected
function
defineReturnType
()
{
return
'nonempty dict'
;
}
protected
function
defineErrorTypes
()
{
return
array
(
'ERR_BAD_TASK'
=>
pht
(
'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
))
->
needSubscriberPHIDs
(
true
)
->
needProjectPHIDs
(
true
)
->
executeOne
();
if
(!
$task
)
{
throw
new
ConduitException
(
'ERR_BAD_TASK'
);
}
return
$this
->
buildTaskInfoDictionary
(
$task
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 11:18 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
73153
Default Alt Text
ManiphestInfoConduitAPIMethod.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment