Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/countdown/storage/PhabricatorCountdownTransaction.php
13442 views
1
<?php
2
3
final class PhabricatorCountdownTransaction
4
extends PhabricatorModularTransaction {
5
6
const MAILTAG_DETAILS = 'countdown:details';
7
const MAILTAG_COMMENT = 'countdown:comment';
8
const MAILTAG_OTHER = 'countdown:other';
9
10
public function getApplicationName() {
11
return 'countdown';
12
}
13
14
public function getApplicationTransactionType() {
15
return PhabricatorCountdownCountdownPHIDType::TYPECONST;
16
}
17
18
public function getApplicationTransactionCommentObject() {
19
return new PhabricatorCountdownTransactionComment();
20
}
21
22
public function getBaseTransactionClass() {
23
return 'PhabricatorCountdownTransactionType';
24
}
25
26
public function getMailTags() {
27
$tags = parent::getMailTags();
28
29
switch ($this->getTransactionType()) {
30
case PhabricatorTransactions::TYPE_COMMENT:
31
$tags[] = self::MAILTAG_COMMENT;
32
break;
33
case PhabricatorCountdownTitleTransaction::TRANSACTIONTYPE:
34
case PhabricatorCountdownEpochTransaction::TRANSACTIONTYPE:
35
case PhabricatorCountdownDescriptionTransaction::TRANSACTIONTYPE:
36
$tags[] = self::MAILTAG_DETAILS;
37
break;
38
default:
39
$tags[] = self::MAILTAG_OTHER;
40
break;
41
}
42
43
return $tags;
44
}
45
}
46
47