Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93493692
DifferentialDiffAuthorProjectsHeraldField.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, Nov 29, 04:55
Size
732 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 04:55 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22643711
Attached To
rPH Phabricator
DifferentialDiffAuthorProjectsHeraldField.php
View Options
<?php
final
class
DifferentialDiffAuthorProjectsHeraldField
extends
DifferentialDiffHeraldField
{
const
FIELDCONST
=
'differential.diff.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