Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81118239
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
Wed, Sep 4, 07:13
Size
818 B
Mime Type
text/x-php
Expires
Fri, Sep 6, 07:13 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20516901
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