mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 04:02:43 +01:00
36e2d02d6e
Summary: `pht`ize a whole bunch of strings in rP. Test Plan: Intense eyeballing. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12797
36 lines
836 B
PHP
36 lines
836 B
PHP
<?php
|
|
|
|
final class ManiphestCreateTaskConduitAPIMethod
|
|
extends ManiphestConduitAPIMethod {
|
|
|
|
public function getAPIMethodName() {
|
|
return 'maniphest.createtask';
|
|
}
|
|
|
|
public function getMethodDescription() {
|
|
return pht('Create a new Maniphest task.');
|
|
}
|
|
|
|
protected function defineParamTypes() {
|
|
return $this->getTaskFields($is_new = true);
|
|
}
|
|
|
|
protected function defineReturnType() {
|
|
return 'nonempty dict';
|
|
}
|
|
|
|
protected function defineErrorTypes() {
|
|
return array(
|
|
'ERR-INVALID-PARAMETER' => pht('Missing or malformed parameter.'),
|
|
);
|
|
}
|
|
|
|
protected function execute(ConduitAPIRequest $request) {
|
|
$task = ManiphestTask::initializeNewTask($request->getUser());
|
|
|
|
$task = $this->applyRequest($task, $request, $is_new = true);
|
|
|
|
return $this->buildTaskInfoDictionary($task);
|
|
}
|
|
|
|
}
|