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