Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101620785
ConduitAPI_maniphest_createtask_Method.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
Wed, Feb 12, 04:01
Size
853 B
Mime Type
text/x-php
Expires
Fri, Feb 14, 04:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24198851
Attached To
rPH Phabricator
ConduitAPI_maniphest_createtask_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_maniphest_createtask_Method
extends
ConduitAPI_maniphest_Method
{
public
function
getMethodDescription
()
{
return
"Create a new Maniphest task."
;
}
public
function
defineParamTypes
()
{
return
$this
->
getTaskFields
(
$is_new
=
true
);
}
public
function
defineReturnType
()
{
return
'nonempty dict'
;
}
public
function
defineErrorTypes
()
{
return
array
(
'ERR-INVALID-PARAMETER'
=>
'Missing or malformed parameter.'
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$task
=
new
ManiphestTask
();
$task
->
setPriority
(
ManiphestTaskPriority
::
getDefaultPriority
());
$task
->
setAuthorPHID
(
$request
->
getUser
()->
getPHID
());
$this
->
applyRequest
(
$task
,
$request
,
$is_new
=
true
);
return
$this
->
buildTaskInfoDictionary
(
$task
);
}
}
Event Timeline
Log In to Comment