Path: blob/master/src/applications/macro/editor/PhabricatorMacroEditor.php
12241 views
<?php12final class PhabricatorMacroEditor3extends PhabricatorApplicationTransactionEditor {45public function getEditorApplicationClass() {6return 'PhabricatorMacroApplication';7}89public function getEditorObjectsDescription() {10return pht('Macros');11}1213public function getCreateObjectTitle($author, $object) {14return pht('%s created this macro.', $author);15}1617public function getCreateObjectTitleForFeed($author, $object) {18return pht('%s created %s.', $author, $object);19}2021protected function shouldSendMail(22PhabricatorLiskDAO $object,23array $xactions) {24return true;25}2627protected function buildReplyHandler(PhabricatorLiskDAO $object) {28return id(new PhabricatorMacroReplyHandler())29->setMailReceiver($object);30}3132protected function buildMailTemplate(PhabricatorLiskDAO $object) {33$name = $object->getName();34$name = 'Image Macro "'.$name.'"';3536return id(new PhabricatorMetaMTAMail())37->setSubject($name);38}3940protected function getMailTo(PhabricatorLiskDAO $object) {41return array(42$this->requireActor()->getPHID(),43);44}4546protected function buildMailBody(47PhabricatorLiskDAO $object,48array $xactions) {4950$body = parent::buildMailBody($object, $xactions);51$body->addLinkSection(52pht('MACRO DETAIL'),53PhabricatorEnv::getProductionURI('/macro/view/'.$object->getID().'/'));5455return $body;56}5758protected function getMailSubjectPrefix() {59return pht('[Macro]');60}6162protected function shouldPublishFeedStory(63PhabricatorLiskDAO $object,64array $xactions) {65return true;66}67}686970