2015-07-07 11:53:17 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DiffusionCommitRevisionReviewersHeraldField
|
|
|
|
extends DiffusionCommitHeraldField {
|
|
|
|
|
|
|
|
const FIELDCONST = 'diffusion.commit.revision.reviewers';
|
|
|
|
|
|
|
|
public function getHeraldFieldName() {
|
|
|
|
return pht('Differential reviewers');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getHeraldFieldValue($object) {
|
|
|
|
$revision = $this->getAdapter()->loadDifferentialRevision();
|
|
|
|
|
|
|
|
if (!$revision) {
|
|
|
|
return array();
|
|
|
|
}
|
|
|
|
|
|
|
|
return $revision->getReviewers();
|
|
|
|
}
|
|
|
|
|
2015-07-16 14:11:44 -07:00
|
|
|
protected function getHeraldFieldStandardType() {
|
|
|
|
return self::STANDARD_PHID_LIST;
|
2015-07-07 11:53:17 -07:00
|
|
|
}
|
|
|
|
|
2015-07-16 14:12:44 -07:00
|
|
|
protected function getDatasource() {
|
|
|
|
return new PhabricatorProjectOrUserDatasource();
|
2015-07-07 11:53:17 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|