Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/diffusion/herald/DiffusionAuditorsAddSelfHeraldAction.php
12242 views
1
<?php
2
3
final class DiffusionAuditorsAddSelfHeraldAction
4
extends DiffusionAuditorsHeraldAction {
5
6
const ACTIONCONST = 'diffusion.auditors.self.add';
7
8
public function getHeraldActionName() {
9
return pht('Add me as an auditor');
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
$phid = $rule->getAuthorPHID();
19
return $this->applyAuditors(array($phid), $rule);
20
}
21
22
public function getHeraldActionStandardType() {
23
return self::STANDARD_NONE;
24
}
25
26
public function renderActionDescription($value) {
27
return pht('Add rule author as auditor.');
28
}
29
30
}
31
32