3 final class PhabricatorCountdownEditor
4 extends PhabricatorApplicationTransactionEditor
{
6 public function getEditorApplicationClass() {
7 return 'PhabricatorCountdownApplication';
10 public function getEditorObjectsDescription() {
11 return pht('Countdown');
14 public function getTransactionTypes() {
15 $types = parent
::getTransactionTypes();
17 $types[] = PhabricatorTransactions
::TYPE_EDGE
;
18 $types[] = PhabricatorTransactions
::TYPE_SPACE
;
19 $types[] = PhabricatorTransactions
::TYPE_VIEW_POLICY
;
20 $types[] = PhabricatorTransactions
::TYPE_EDIT_POLICY
;
21 $types[] = PhabricatorTransactions
::TYPE_COMMENT
;
26 protected function shouldSendMail(
27 PhabricatorLiskDAO
$object,
32 public function getMailTagsMap() {
34 PhabricatorCountdownTransaction
::MAILTAG_DETAILS
=>
35 pht('Someone changes the countdown details.'),
36 PhabricatorCountdownTransaction
::MAILTAG_COMMENT
=>
37 pht('Someone comments on a countdown.'),
38 PhabricatorCountdownTransaction
::MAILTAG_OTHER
=>
39 pht('Other countdown activity not listed above occurs.'),
43 protected function buildMailTemplate(PhabricatorLiskDAO
$object) {
44 $monogram = $object->getMonogram();
45 $name = $object->getTitle();
47 return id(new PhabricatorMetaMTAMail())
48 ->setSubject("{$monogram}: {$name}");
51 protected function buildMailBody(
52 PhabricatorLiskDAO
$object,
55 $body = parent
::buildMailBody($object, $xactions);
56 $description = $object->getDescription();
58 if (strlen($description)) {
59 $body->addRemarkupSection(
60 pht('COUNTDOWN DESCRIPTION'),
61 $object->getDescription());
64 $body->addLinkSection(
65 pht('COUNTDOWN DETAIL'),
66 PhabricatorEnv
::getProductionURI('/'.$object->getMonogram()));
71 protected function getMailTo(PhabricatorLiskDAO
$object) {
73 $object->getAuthorPHID(),
74 $this->requireActor()->getPHID(),
77 protected function getMailSubjectPrefix() {
81 protected function buildReplyHandler(PhabricatorLiskDAO
$object) {
82 return id(new PhabricatorCountdownReplyHandler())
83 ->setMailReceiver($object);
86 protected function shouldPublishFeedStory(
87 PhabricatorLiskDAO
$object,
92 protected function supportsSearch() {