Page MenuHomestyx hydra

ConduitAPI_maniphest_info_Method.php
No OneTemporary

ConduitAPI_maniphest_info_Method.php

<?php
/**
* @group conduit
*/
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);
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Feb 24, 9:28 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
808560
Default Alt Text
ConduitAPI_maniphest_info_Method.php (915 B)

Event Timeline