Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/metamta/herald/PhabricatorMailOutboundRoutingSelfNotificationHeraldAction.php
12256 views
1
<?php
2
3
final class PhabricatorMailOutboundRoutingSelfNotificationHeraldAction
4
extends PhabricatorMailOutboundRoutingHeraldAction {
5
6
const ACTIONCONST = 'routing.self.notification';
7
8
public function getHeraldActionName() {
9
return pht('Deliver as notification');
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
$rule = $effect->getRule();
18
$author_phid = $rule->getAuthorPHID();
19
20
$this->applyRouting(
21
$rule,
22
PhabricatorMailRoutingRule::ROUTE_AS_NOTIFICATION,
23
array($author_phid));
24
}
25
26
public function getHeraldActionStandardType() {
27
return self::STANDARD_NONE;
28
}
29
30
public function renderActionDescription($value) {
31
return pht('Deliver as notification.');
32
}
33
34
}
35
36