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();
25 $types[] = PhabricatorTransactions
::TYPE_VIEW_POLICY
;
26 $types[] = PhabricatorTransactions
::TYPE_EDIT_POLICY
;
27 $types[] = PhabricatorTransactions
::TYPE_INTERACT_POLICY
;
32 protected function shouldSendMail(
33 PhabricatorLiskDAO
$object,
38 protected function shouldPublishFeedStory(
39 PhabricatorLiskDAO
$object,
44 protected function getMailTo(PhabricatorLiskDAO
$object) {
46 $phids[] = $this->requireActor()->getPHID();
47 $phids[] = $object->getCreatorPHID();
52 protected function buildMailTemplate(PhabricatorLiskDAO
$object) {
53 $name = $object->getName();
55 return id(new PhabricatorMetaMTAMail())
59 protected function buildReplyHandler(PhabricatorLiskDAO
$object) {
60 return id(new PhameBlogReplyHandler())
61 ->setMailReceiver($object);
64 protected function buildMailBody(
65 PhabricatorLiskDAO
$object,
68 $body = parent
::buildMailBody($object, $xactions);
70 $body->addLinkSection(
72 PhabricatorEnv
::getProductionURI($object->getViewURI()));
77 public function getMailTagsMap() {
79 PhameBlogTransaction
::MAILTAG_DETAILS
=>
80 pht("A blog's details change."),
81 PhameBlogTransaction
::MAILTAG_SUBSCRIBERS
=>
82 pht("A blog's subscribers change."),
83 PhameBlogTransaction
::MAILTAG_OTHER
=>
84 pht('Other blog activity not listed above occurs.'),
88 protected function getMailSubjectPrefix() {
93 protected function supportsSearch() {
97 protected function shouldApplyHeraldRules(
98 PhabricatorLiskDAO
$object,
103 protected function buildHeraldAdapter(
104 PhabricatorLiskDAO
$object,
107 return id(new HeraldPhameBlogAdapter())