Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93165560
DiffusionCommitBranchesHeraldField.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
Tue, Nov 26, 17:21
Size
818 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 17:21 (2 d)
Engine
blob
Format
Raw Data
Handle
22581090
Attached To
rPH Phabricator
DiffusionCommitBranchesHeraldField.php
View Options
<?php
final
class
DiffusionCommitBranchesHeraldField
extends
DiffusionCommitHeraldField
{
const
FIELDCONST
=
'diffusion.commit.branches'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Branches'
);
}
public
function
getHeraldFieldValue
(
$object
)
{
$commit
=
$object
;
$repository
=
$object
->
getRepository
();
$params
=
array
(
'repository'
=>
$repository
->
getPHID
(),
'contains'
=>
$commit
->
getCommitIdentifier
(),
);
$result
=
id
(
new
ConduitCall
(
'diffusion.branchquery'
,
$params
))
->
setUser
(
PhabricatorUser
::
getOmnipotentUser
())
->
execute
();
$refs
=
DiffusionRepositoryRef
::
loadAllFromDictionaries
(
$result
);
return
mpull
(
$refs
,
'getShortName'
);
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_TEXT_LIST
;
}
}
Event Timeline
Log In to Comment