Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/metamta/herald/PhabricatorMetaMTAEmailSelfHeraldAction.php
12256 views
1
<?php
2
3
final class PhabricatorMetaMTAEmailSelfHeraldAction
4
extends PhabricatorMetaMTAEmailHeraldAction {
5
6
const ACTIONCONST = 'email.self';
7
8
public function getHeraldActionName() {
9
return pht('Send me an email');
10
}
11
12
public function supportsRuleType($rule_type) {
13
return ($rule_type == HeraldRuleTypeConfig::RULE_TYPE_PERSONAL);
14
}
15
16
public function applyEffect($object, HeraldEffect $effect) {
17
$phid = $effect->getRule()->getAuthorPHID();
18
19
// For personal rules, we'll force delivery of a real email. This effect
20
// is stronger than notification preferences, so you get an actual email
21
// even if your preferences are set to "Notify" or "Ignore".
22
23
return $this->applyEmail(array($phid), $force = true);
24
}
25
26
public function getHeraldActionStandardType() {
27
return self::STANDARD_NONE;
28
}
29
30
public function renderActionDescription($value) {
31
return pht('Send an email to rule author.');
32
}
33
34
}
35
36