Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18927688
ManiphestInfoConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
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.'
);
}
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
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Nov 11, 9:15 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8240495
Default Alt Text
ManiphestInfoConduitAPIMethod.php (1 KB)
Attached To
Mode
rP Phabricator
Attached
Detach File
Event Timeline
Log In to Comment