Path: blob/master/src/applications/maniphest/conduit/ManiphestCreateTaskConduitAPIMethod.php
12256 views
<?php12final class ManiphestCreateTaskConduitAPIMethod3extends ManiphestConduitAPIMethod {45public function getAPIMethodName() {6return 'maniphest.createtask';7}89public function getMethodDescription() {10return pht('Create a new Maniphest task.');11}1213public function getMethodStatus() {14return self::METHOD_STATUS_FROZEN;15}1617public function getMethodStatusDescription() {18return pht(19'This method is frozen and will eventually be deprecated. New code '.20'should use "maniphest.edit" instead.');21}2223protected function defineParamTypes() {24return $this->getTaskFields($is_new = true);25}2627protected function defineReturnType() {28return 'nonempty dict';29}3031protected function defineErrorTypes() {32return array(33'ERR-INVALID-PARAMETER' => pht('Missing or malformed parameter.'),34);35}3637protected function execute(ConduitAPIRequest $request) {38$task = ManiphestTask::initializeNewTask($request->getUser());3940$task = $this->applyRequest($task, $request, $is_new = true);4142return $this->buildTaskInfoDictionary($task);43}4445}464748