3 final class PhabricatorBadgesTransaction
4 extends PhabricatorModularTransaction
{
6 const MAILTAG_DETAILS
= 'badges:details';
7 const MAILTAG_COMMENT
= 'badges:comment';
8 const MAILTAG_OTHER
= 'badges:other';
10 public function getApplicationName() {
14 public function getApplicationTransactionType() {
15 return PhabricatorBadgesPHIDType
::TYPECONST
;
18 public function getApplicationTransactionCommentObject() {
19 return new PhabricatorBadgesTransactionComment();
22 public function getBaseTransactionClass() {
23 return 'PhabricatorBadgesBadgeTransactionType';
26 public function getMailTags() {
27 $tags = parent
::getMailTags();
29 switch ($this->getTransactionType()) {
30 case PhabricatorTransactions
::TYPE_COMMENT
:
31 $tags[] = self
::MAILTAG_COMMENT
;
33 case PhabricatorBadgesBadgeNameTransaction
::TRANSACTIONTYPE
:
34 case PhabricatorBadgesBadgeDescriptionTransaction
::TRANSACTIONTYPE
:
35 case PhabricatorBadgesBadgeFlavorTransaction
::TRANSACTIONTYPE
:
36 case PhabricatorBadgesBadgeIconTransaction
::TRANSACTIONTYPE
:
37 case PhabricatorBadgesBadgeStatusTransaction
::TRANSACTIONTYPE
:
38 case PhabricatorBadgesBadgeQualityTransaction
::TRANSACTIONTYPE
:
39 $tags[] = self
::MAILTAG_DETAILS
;
41 case PhabricatorBadgesBadgeAwardTransaction
::TRANSACTIONTYPE
:
42 case PhabricatorBadgesBadgeRevokeTransaction
::TRANSACTIONTYPE
:
44 $tags[] = self
::MAILTAG_OTHER
;