Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / badges / storage / PhabricatorBadgesTransaction.php
blob75d8f7fd5953b47a355dfcb1d08176275c04a5b7
1 <?php
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() {
11 return 'badges';
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;
32 break;
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;
40 break;
41 case PhabricatorBadgesBadgeAwardTransaction::TRANSACTIONTYPE:
42 case PhabricatorBadgesBadgeRevokeTransaction::TRANSACTIONTYPE:
43 default:
44 $tags[] = self::MAILTAG_OTHER;
45 break;
47 return $tags;