forked from phacility/phabricator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhabricatorPasteTransaction.php
44 lines (36 loc) · 1.13 KB
/
PhabricatorPasteTransaction.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
final class PhabricatorPasteTransaction
extends PhabricatorModularTransaction {
const MAILTAG_CONTENT = 'paste-content';
const MAILTAG_OTHER = 'paste-other';
const MAILTAG_COMMENT = 'paste-comment';
public function getApplicationName() {
return 'paste';
}
public function getApplicationTransactionType() {
return PhabricatorPastePastePHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {
return new PhabricatorPasteTransactionComment();
}
public function getBaseTransactionClass() {
return 'PhabricatorPasteTransactionType';
}
public function getMailTags() {
$tags = array();
switch ($this->getTransactionType()) {
case PhabricatorPasteTitleTransaction::TRANSACTIONTYPE:
case PhabricatorPasteContentTransaction::TRANSACTIONTYPE:
case PhabricatorPasteLanguageTransaction::TRANSACTIONTYPE:
$tags[] = self::MAILTAG_CONTENT;
break;
case PhabricatorTransactions::TYPE_COMMENT:
$tags[] = self::MAILTAG_COMMENT;
break;
default:
$tags[] = self::MAILTAG_OTHER;
break;
}
return $tags;
}
}