1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 11:12:42 +01:00
phorge-phorge/src/applications/diffusion/herald/DiffusionAuditorsAddSelfHeraldAction.php
2015-08-03 14:33:27 -07:00

30 lines
746 B
PHP

<?php
final class DiffusionAuditorsAddSelfHeraldAction
extends DiffusionAuditorsHeraldAction {
const ACTIONCONST = 'diffusion.auditors.self.add';
public function getHeraldActionName() {
return pht('Add me as an auditor');
}
public function supportsRuleType($rule_type) {
return ($rule_type == HeraldRuleTypeConfig::RULE_TYPE_PERSONAL);
}
public function applyEffect($object, HeraldEffect $effect) {
$rule = $effect->getRule();
$phid = $rule->getAuthorPHID();
return $this->applyAuditors(array($phid), $rule);
}
public function getHeraldActionStandardType() {
return self::STANDARD_NONE;
}
public function renderActionDescription($value) {
return pht('Add rule author as auditor.');
}
}