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