3 final class FundInitiativeEditor
4 extends PhabricatorApplicationTransactionEditor
{
6 public function getEditorApplicationClass() {
7 return 'PhabricatorFundApplication';
10 public function getEditorObjectsDescription() {
11 return pht('Fund Initiatives');
14 public function getCreateObjectTitle($author, $object) {
15 return pht('%s created this initiative.', $author);
18 public function getCreateObjectTitleForFeed($author, $object) {
19 return pht('%s created %s.', $author, $object);
22 public function getTransactionTypes() {
23 $types = parent
::getTransactionTypes();
24 $types[] = PhabricatorTransactions
::TYPE_VIEW_POLICY
;
25 $types[] = PhabricatorTransactions
::TYPE_EDIT_POLICY
;
26 $types[] = PhabricatorTransactions
::TYPE_COMMENT
;
31 protected function shouldSendMail(
32 PhabricatorLiskDAO
$object,
37 public function getMailTagsMap() {
39 FundInitiativeTransaction
::MAILTAG_BACKER
=>
40 pht('Someone backs an initiative.'),
41 FundInitiativeTransaction
::MAILTAG_STATUS
=>
42 pht("An initiative's status changes."),
43 FundInitiativeTransaction
::MAILTAG_OTHER
=>
44 pht('Other initiative activity not listed above occurs.'),
48 protected function buildMailTemplate(PhabricatorLiskDAO
$object) {
49 $monogram = $object->getMonogram();
50 $name = $object->getName();
52 return id(new PhabricatorMetaMTAMail())
53 ->setSubject("{$monogram}: {$name}");
56 protected function buildMailBody(
57 PhabricatorLiskDAO
$object,
60 $body = parent
::buildMailBody($object, $xactions);
62 $body->addLinkSection(
63 pht('INITIATIVE DETAIL'),
64 PhabricatorEnv
::getProductionURI('/'.$object->getMonogram()));
69 protected function getMailTo(PhabricatorLiskDAO
$object) {
70 return array($object->getOwnerPHID());
73 protected function getMailSubjectPrefix() {
77 protected function buildReplyHandler(PhabricatorLiskDAO
$object) {
78 return id(new FundInitiativeReplyHandler())
79 ->setMailReceiver($object);
82 protected function shouldPublishFeedStory(
83 PhabricatorLiskDAO
$object,
88 protected function supportsSearch() {