Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / phame / storage / PhamePostTransaction.php
blob6adc640b673234060bcabf891fd0eb43e84d4dee
1 <?php
3 final class PhamePostTransaction
4 extends PhabricatorModularTransaction {
6 const MAILTAG_CONTENT = 'phame-post-content';
7 const MAILTAG_SUBSCRIBERS = 'phame-post-subscribers';
8 const MAILTAG_COMMENT = 'phame-post-comment';
9 const MAILTAG_OTHER = 'phame-post-other';
11 public function getApplicationName() {
12 return 'phame';
15 public function getApplicationTransactionType() {
16 return PhabricatorPhamePostPHIDType::TYPECONST;
19 public function getBaseTransactionClass() {
20 return 'PhamePostTransactionType';
23 public function getApplicationTransactionCommentObject() {
24 return new PhamePostTransactionComment();
27 public function getMailTags() {
28 $tags = parent::getMailTags();
30 switch ($this->getTransactionType()) {
31 case PhabricatorTransactions::TYPE_COMMENT:
32 $tags[] = self::MAILTAG_COMMENT;
33 break;
34 case PhabricatorTransactions::TYPE_SUBSCRIBERS:
35 $tags[] = self::MAILTAG_SUBSCRIBERS;
36 break;
37 case PhamePostTitleTransaction::TRANSACTIONTYPE:
38 case PhamePostSubtitleTransaction::TRANSACTIONTYPE:
39 case PhamePostBodyTransaction::TRANSACTIONTYPE:
40 $tags[] = self::MAILTAG_CONTENT;
41 break;
42 default:
43 $tags[] = self::MAILTAG_OTHER;
44 break;
46 return $tags;