Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81579093
DifferentialTagsCommitMessageField.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
Fri, Sep 6, 20:49
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Sep 8, 20:49 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20598369
Attached To
rPH Phabricator
DifferentialTagsCommitMessageField.php
View Options
<?php
final
class
DifferentialTagsCommitMessageField
extends
DifferentialCommitMessageField
{
const
FIELDKEY
=
'phabricator:projects'
;
public
function
getFieldName
()
{
return
pht
(
'Tags'
);
}
public
function
getFieldOrder
()
{
return
7000
;
}
public
function
getFieldAliases
()
{
return
array
(
'Tag'
,
'Project'
,
'Projects'
,
);
}
public
function
isTemplateField
()
{
return
false
;
}
public
function
parseFieldValue
(
$value
)
{
return
$this
->
parseObjectList
(
$value
,
array
(
PhabricatorProjectProjectPHIDType
::
TYPECONST
,
));
}
public
function
readFieldValueFromObject
(
DifferentialRevision
$revision
)
{
if
(!
$revision
->
getPHID
())
{
return
array
();
}
$projects
=
PhabricatorEdgeQuery
::
loadDestinationPHIDs
(
$revision
->
getPHID
(),
PhabricatorProjectObjectHasProjectEdgeType
::
EDGECONST
);
$projects
=
array_reverse
(
$projects
);
return
$projects
;
}
public
function
readFieldValueFromConduit
(
$value
)
{
return
$this
->
readStringListFieldValueFromConduit
(
$value
);
}
public
function
renderFieldValue
(
$value
)
{
return
$this
->
renderHandleList
(
$value
);
}
public
function
getFieldTransactions
(
$value
)
{
return
array
(
array
(
'type'
=>
PhabricatorProjectsEditEngineExtension
::
EDITKEY_SET
,
'value'
=>
$value
,
),
);
}
}
Event Timeline
Log In to Comment