Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php
12256 views
1
<?php
2
3
final class PhabricatorMetaMTAApplicationEmailHeraldField
4
extends HeraldField {
5
6
const FIELDCONST = 'application-email';
7
8
public function getHeraldFieldName() {
9
return pht('Receiving email addresses');
10
}
11
12
public function getFieldGroupKey() {
13
return HeraldEditFieldGroup::FIELDGROUPKEY;
14
}
15
16
public function supportsObject($object) {
17
return $this->getAdapter()->supportsApplicationEmail();
18
}
19
20
public function getHeraldFieldValue($object) {
21
$phids = array();
22
23
$email = $this->getAdapter()->getApplicationEmail();
24
if ($email) {
25
$phids[] = $email->getPHID();
26
}
27
28
return $phids;
29
}
30
31
protected function getHeraldFieldStandardType() {
32
return self::STANDARD_PHID_LIST;
33
}
34
35
protected function getDatasource() {
36
return new PhabricatorMetaMTAApplicationEmailDatasource();
37
}
38
39
}
40
41