Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / countdown / editor / PhabricatorCountdownEditor.php
blob2102b3785be8975676ab6778128897d98b804c30
1 <?php
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;
23 return $types;
26 protected function shouldSendMail(
27 PhabricatorLiskDAO $object,
28 array $xactions) {
29 return true;
32 public function getMailTagsMap() {
33 return array(
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,
53 array $xactions) {
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()));
68 return $body;
71 protected function getMailTo(PhabricatorLiskDAO $object) {
72 return array(
73 $object->getAuthorPHID(),
74 $this->requireActor()->getPHID(),
77 protected function getMailSubjectPrefix() {
78 return '[Countdown]';
81 protected function buildReplyHandler(PhabricatorLiskDAO $object) {
82 return id(new PhabricatorCountdownReplyHandler())
83 ->setMailReceiver($object);
86 protected function shouldPublishFeedStory(
87 PhabricatorLiskDAO $object,
88 array $xactions) {
89 return true;
92 protected function supportsSearch() {
93 return true;