@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at recaptime-dev/main 60 lines 1.3 kB view raw
1<?php 2 3final class PhamePostBodyTransaction 4 extends PhamePostTransactionType { 5 6 const TRANSACTIONTYPE = 'phame.post.body'; 7 8 public function generateOldValue($object) { 9 return $object->getBody(); 10 } 11 12 public function applyInternalEffects($object, $value) { 13 $object->setBody($value); 14 } 15 16 public function getTitle() { 17 return pht( 18 '%s updated the post content.', 19 $this->renderAuthor()); 20 } 21 22 public function getTitleForFeed() { 23 return pht( 24 '%s updated the post content for %s.', 25 $this->renderAuthor(), 26 $this->renderObject()); 27 } 28 29 public function hasChangeDetailView() { 30 return true; 31 } 32 33 public function getMailDiffSectionHeader() { 34 return pht('CHANGES TO POST CONTENT'); 35 } 36 37 public function newChangeDetailView() { 38 $viewer = $this->getViewer(); 39 40 return id(new PhabricatorApplicationTransactionTextDiffDetailView()) 41 ->setViewer($viewer) 42 ->setOldText($this->getOldValue()) 43 ->setNewText($this->getNewValue()); 44 } 45 46 public function newRemarkupChanges() { 47 $changes = array(); 48 49 $changes[] = $this->newRemarkupChange() 50 ->setOldValue($this->getOldValue()) 51 ->setNewValue($this->getNewValue()); 52 53 return $changes; 54 } 55 56 public function getIcon() { 57 return 'fa-file-text-o'; 58 } 59 60}