Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108009285
ManiphestInfoConduitAPIMethod.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
Sun, Apr 13, 03:08
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Apr 15, 03:08 (2 d)
Engine
blob
Format
Raw Data
Handle
25512377
Attached To
rPH Phabricator
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.'
);
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_FROZEN
;
}
public
function
getMethodStatusDescription
()
{
return
pht
(
'This method is frozen and will eventually be deprecated. New code '
.
'should use "maniphest.search" instead.'
);
}
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
);
}
}
Event Timeline
Log In to Comment