Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92983625
DifferentialRevisionAuthorProjectsHeraldField.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
Mon, Nov 25, 08:46
Size
744 B
Mime Type
text/x-php
Expires
Wed, Nov 27, 08:46 (2 d)
Engine
blob
Format
Raw Data
Handle
22549974
Attached To
rPH Phabricator
DifferentialRevisionAuthorProjectsHeraldField.php
View Options
<?php
final
class
DifferentialRevisionAuthorProjectsHeraldField
extends
DifferentialRevisionHeraldField
{
const
FIELDCONST
=
'differential.revision.author.projects'
;
public
function
getHeraldFieldName
()
{
return
pht
(
"Author's projects"
);
}
public
function
getHeraldFieldValue
(
$object
)
{
$viewer
=
PhabricatorUser
::
getOmnipotentUser
();
$projects
=
id
(
new
PhabricatorProjectQuery
())
->
setViewer
(
$viewer
)
->
withMemberPHIDs
(
array
(
$object
->
getAuthorPHID
()))
->
execute
();
return
mpull
(
$projects
,
'getPHID'
);
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_PHID_LIST
;
}
protected
function
getDatasource
()
{
return
new
PhabricatorProjectDatasource
();
}
}
Event Timeline
Log In to Comment