@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 HeraldExactProjectsField extends HeraldField {
4
5 const FIELDCONST = 'projects.exact';
6
7 public function getHeraldFieldName() {
8 return pht('Projects being edited');
9 }
10
11 public function getFieldGroupKey() {
12 return PhabricatorProjectHeraldFieldGroup::FIELDGROUPKEY;
13 }
14
15 public function supportsObject($object) {
16 return ($object instanceof PhabricatorProject);
17 }
18
19 public function getHeraldFieldValue($object) {
20 return array($object->getPHID());
21 }
22
23 protected function getHeraldFieldStandardType() {
24 return self::STANDARD_PHID_LIST;
25 }
26
27 protected function getDatasource() {
28 return new PhabricatorProjectDatasource();
29 }
30
31}