3 final class DiffusionCommitRevisionAcceptingReviewersHeraldField
4 extends DiffusionCommitHeraldField
{
6 const FIELDCONST
= 'diffusion.commit.revision.accepting';
8 public function getHeraldFieldName() {
9 return pht('Accepting reviewers');
12 public function getFieldGroupKey() {
13 return HeraldRelatedFieldGroup
::FIELDGROUPKEY
;
16 public function getHeraldFieldValue($object) {
17 $revision = $this->getAdapter()->loadDifferentialRevision();
23 $diff_phid = $revision->getActiveDiffPHID();
25 $reviewer_phids = array();
26 foreach ($revision->getReviewers() as $reviewer) {
27 if ($reviewer->isAccepted($diff_phid)) {
28 $reviewer_phids[] = $reviewer->getReviewerPHID();
32 return $reviewer_phids;
35 protected function getHeraldFieldStandardType() {
36 return self
::STANDARD_PHID_LIST
;
39 protected function getDatasource() {
40 return new DifferentialReviewerDatasource();