Remove product literal strings in "pht()", part 18
[phabricator.git] / src / applications / metamta / herald / PhabricatorMailOutboundMailHeraldAdapter.php
blob94c13c9e0a322d181f41105e28558d5b5d659c62
1 <?php
3 final class PhabricatorMailOutboundMailHeraldAdapter
4 extends HeraldAdapter {
6 private $mail;
8 public function getAdapterApplicationClass() {
9 return 'PhabricatorMetaMTAApplication';
12 public function getAdapterContentDescription() {
13 return pht('Route outbound email.');
16 protected function initializeNewAdapter() {
17 $this->mail = $this->newObject();
20 protected function newObject() {
21 return new PhabricatorMetaMTAMail();
24 public function isTestAdapterForObject($object) {
25 return ($object instanceof PhabricatorMetaMTAMail);
28 public function getAdapterTestDescription() {
29 return pht(
30 'Test rules which run when outbound mail is being prepared for '.
31 'delivery.');
35 public function getObject() {
36 return $this->mail;
39 public function setObject(PhabricatorMetaMTAMail $mail) {
40 $this->mail = $mail;
41 return $this;
44 public function getAdapterContentName() {
45 return pht('Outbound Mail');
48 public function isSingleEventAdapter() {
49 return true;
52 public function supportsRuleType($rule_type) {
53 switch ($rule_type) {
54 case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL:
55 case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL:
56 return true;
57 case HeraldRuleTypeConfig::RULE_TYPE_OBJECT:
58 default:
59 return false;
63 public function getHeraldName() {
64 return pht('Mail %d', $this->getObject()->getID());
67 public function supportsWebhooks() {
68 return false;