Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/differential/herald/DifferentialReviewersAddReviewersHeraldAction.php
12256 views
1
<?php
2
3
final class DifferentialReviewersAddReviewersHeraldAction
4
extends DifferentialReviewersHeraldAction {
5
6
const ACTIONCONST = 'differential.reviewers.add';
7
8
public function getHeraldActionName() {
9
return pht('Add reviewers');
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
return $this->applyReviewers($effect->getTarget(), $is_blocking = false);
18
}
19
20
public function getHeraldActionStandardType() {
21
return self::STANDARD_PHID_LIST;
22
}
23
24
protected function getDatasource() {
25
return new DiffusionAuditorDatasource();
26
}
27
28
public function renderActionDescription($value) {
29
return pht('Add reviewers: %s.', $this->renderHandleList($value));
30
}
31
32
public function getPHIDsAffectedByAction(HeraldActionRecord $record) {
33
return $record->getTarget();
34
}
35
36
}
37
38