3 final class PhameBlogEditor
4 extends PhabricatorApplicationTransactionEditor
{
6 public function getEditorApplicationClass() {
7 return 'PhabricatorPhameApplication';
10 public function getEditorObjectsDescription() {
11 return pht('Phame Blogs');
14 public function getCreateObjectTitle($author, $object) {
15 return pht('%s created this blog.', $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
;
30 protected function shouldSendMail(
31 PhabricatorLiskDAO
$object,
36 protected function shouldPublishFeedStory(
37 PhabricatorLiskDAO
$object,
42 protected function getMailTo(PhabricatorLiskDAO
$object) {
44 $phids[] = $this->requireActor()->getPHID();
45 $phids[] = $object->getCreatorPHID();
50 protected function buildMailTemplate(PhabricatorLiskDAO
$object) {
51 $name = $object->getName();
53 return id(new PhabricatorMetaMTAMail())
57 protected function buildReplyHandler(PhabricatorLiskDAO
$object) {
58 return id(new PhameBlogReplyHandler())
59 ->setMailReceiver($object);
62 protected function buildMailBody(
63 PhabricatorLiskDAO
$object,
66 $body = parent
::buildMailBody($object, $xactions);
68 $body->addLinkSection(
70 PhabricatorEnv
::getProductionURI($object->getViewURI()));
75 public function getMailTagsMap() {
77 PhameBlogTransaction
::MAILTAG_DETAILS
=>
78 pht("A blog's details change."),
79 PhameBlogTransaction
::MAILTAG_SUBSCRIBERS
=>
80 pht("A blog's subscribers change."),
81 PhameBlogTransaction
::MAILTAG_OTHER
=>
82 pht('Other blog activity not listed above occurs.'),
86 protected function getMailSubjectPrefix() {
91 protected function supportsSearch() {
95 protected function shouldApplyHeraldRules(
96 PhabricatorLiskDAO
$object,
101 protected function buildHeraldAdapter(
102 PhabricatorLiskDAO
$object,
105 return id(new HeraldPhameBlogAdapter())