2015-07-08 12:26:57 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DiffusionPreCommitContentRevisionSubscribersHeraldField
|
|
|
|
extends DiffusionPreCommitContentHeraldField {
|
|
|
|
|
|
|
|
const FIELDCONST = 'diffusion.pre.content.revision.subscribers';
|
|
|
|
|
|
|
|
public function getHeraldFieldName() {
|
|
|
|
return pht('Differential subscribers');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getHeraldFieldValue($object) {
|
|
|
|
$revision = $this->getAdapter()->getRevision();
|
|
|
|
|
|
|
|
if (!$revision) {
|
|
|
|
return array();
|
|
|
|
}
|
|
|
|
|
|
|
|
$phid = $revision->getPHID();
|
|
|
|
return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid);
|
|
|
|
}
|
|
|
|
|
2015-07-16 14:11:44 -07:00
|
|
|
protected function getHeraldFieldStandardType() {
|
|
|
|
return self::STANDARD_PHID_LIST;
|
2015-07-08 12:26:57 -07:00
|
|
|
}
|
|
|
|
|
2015-07-16 14:12:44 -07:00
|
|
|
protected function getDatasource() {
|
|
|
|
return new PhabricatorProjectOrUserDatasource();
|
2015-07-08 12:26:57 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|