@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class DiffusionPreCommitContentRevisionSubscribersHeraldField
4 extends DiffusionPreCommitContentHeraldField {
5
6 const FIELDCONST = 'diffusion.pre.content.revision.subscribers';
7
8 public function getHeraldFieldName() {
9 return pht('Differential subscribers');
10 }
11
12 public function getFieldGroupKey() {
13 return HeraldRelatedFieldGroup::FIELDGROUPKEY;
14 }
15
16 public function getHeraldFieldValue($object) {
17 $revision = $this->getAdapter()->getRevision();
18
19 if (!$revision) {
20 return array();
21 }
22
23 $phid = $revision->getPHID();
24 return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid);
25 }
26
27 protected function getHeraldFieldStandardType() {
28 return self::STANDARD_PHID_LIST;
29 }
30
31 protected function getDatasource() {
32 return new PhabricatorProjectOrUserDatasource();
33 }
34
35}