Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101325728
DiffusionCommitRevisionAcceptingReviewersHeraldField.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, Feb 7, 19:22
Size
997 B
Mime Type
text/x-php
Expires
Sun, Feb 9, 19:22 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24131094
Attached To
rPH Phabricator
DiffusionCommitRevisionAcceptingReviewersHeraldField.php
View Options
<?php
final
class
DiffusionCommitRevisionAcceptingReviewersHeraldField
extends
DiffusionCommitHeraldField
{
const
FIELDCONST
=
'diffusion.commit.revision.accepting'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Accepting reviewers'
);
}
public
function
getFieldGroupKey
()
{
return
HeraldRelatedFieldGroup
::
FIELDGROUPKEY
;
}
public
function
getHeraldFieldValue
(
$object
)
{
$revision
=
$this
->
getAdapter
()->
loadDifferentialRevision
();
if
(!
$revision
)
{
return
array
();
}
$diff_phid
=
$revision
->
getActiveDiffPHID
();
$reviewer_phids
=
array
();
foreach
(
$revision
->
getReviewers
()
as
$reviewer
)
{
if
(
$reviewer
->
isAccepted
(
$diff_phid
))
{
$reviewer_phids
[]
=
$reviewer
->
getReviewerPHID
();
}
}
return
$reviewer_phids
;
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_PHID_LIST
;
}
protected
function
getDatasource
()
{
return
new
DifferentialReviewerDatasource
();
}
}
Event Timeline
Log In to Comment