Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F546456
DiffusionPreCommitContentCommitterProjectsHeraldField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
883 B
Referenced Files
None
Subscribers
None
DiffusionPreCommitContentCommitterProjectsHeraldField.php
View Options
<?php
final
class
DiffusionPreCommitContentCommitterProjectsHeraldField
extends
DiffusionPreCommitContentHeraldField
{
const
FIELDCONST
=
'diffusion.pre.commit.committer.projects'
;
public
function
getHeraldFieldName
()
{
return
pht
(
"Committer's projects"
);
}
public
function
getHeraldFieldValue
(
$object
)
{
$adapter
=
$this
->
getAdapter
();
$viewer
=
$adapter
->
getViewer
();
$committer_phid
=
$adapter
->
getCommitterPHID
();
if
(!
$committer_phid
)
{
return
array
();
}
$projects
=
id
(
new
PhabricatorProjectQuery
())
->
setViewer
(
$viewer
)
->
withMemberPHIDs
(
array
(
$committer_phid
))
->
execute
();
return
mpull
(
$projects
,
'getPHID'
);
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_PHID_LIST
;
}
protected
function
getDatasource
()
{
return
new
PhabricatorProjectDatasource
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:15 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121552
Default Alt Text
DiffusionPreCommitContentCommitterProjectsHeraldField.php (883 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment