Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108076757
DifferentialManiphestTasksField.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
Sun, Apr 13, 23:58
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Apr 15, 23:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25518596
Attached To
rPH Phabricator
DifferentialManiphestTasksField.php
View Options
<?php
final
class
DifferentialManiphestTasksField
extends
DifferentialCustomField
{
public
function
getFieldKey
()
{
return
'differential:maniphest-tasks'
;
}
public
function
getFieldKeyForConduit
()
{
return
'maniphestTaskPHIDs'
;
}
public
function
getFieldName
()
{
return
pht
(
'Maniphest Tasks'
);
}
public
function
getFieldDescription
()
{
return
pht
(
'Lists associated tasks.'
);
}
public
function
shouldAppearInPropertyView
()
{
return
true
;
}
public
function
renderPropertyViewLabel
()
{
return
$this
->
getFieldName
();
}
public
function
getRequiredHandlePHIDsForPropertyView
()
{
if
(!
$this
->
getObject
()->
getPHID
())
{
return
array
();
}
return
PhabricatorEdgeQuery
::
loadDestinationPHIDs
(
$this
->
getObject
()->
getPHID
(),
PhabricatorEdgeConfig
::
TYPE_DREV_HAS_RELATED_TASK
);
}
public
function
renderPropertyViewValue
(
array
$handles
)
{
return
$this
->
renderHandleList
(
$handles
);
}
public
function
shouldAppearInCommitMessage
()
{
return
true
;
}
public
function
shouldAllowEditInCommitMessage
()
{
return
true
;
}
public
function
getCommitMessageLabels
()
{
return
array
(
'Maniphest Task'
,
'Maniphest Tasks'
,
);
}
public
function
parseValueFromCommitMessage
(
$value
)
{
return
$this
->
parseObjectList
(
$value
,
array
(
ManiphestPHIDTypeTask
::
TYPECONST
,
));
}
public
function
getRequiredHandlePHIDsForCommitMessage
()
{
return
$this
->
getRequiredHandlePHIDsForPropertyView
();
}
public
function
renderCommitMessageValue
(
array
$handles
)
{
return
$this
->
renderObjectList
(
$handles
);
}
public
function
getProTips
()
{
return
array
(
pht
(
'Write "Fixes T123" in your summary to automatically close the '
.
'corresponding task when this change lands.'
),
);
}
}
Event Timeline
Log In to Comment