Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / phame / xaction / PhamePostBodyTransaction.php
blobbf34cf73ffcfaa9e3a890a5ad5e124a53533707e
1 <?php
3 final class PhamePostBodyTransaction
4 extends PhamePostTransactionType {
6 const TRANSACTIONTYPE = 'phame.post.body';
8 public function generateOldValue($object) {
9 return $object->getBody();
12 public function applyInternalEffects($object, $value) {
13 $object->setBody($value);
16 public function getTitle() {
17 return pht(
18 '%s updated the post content.',
19 $this->renderAuthor());
22 public function getTitleForFeed() {
23 return pht(
24 '%s updated the post content for %s.',
25 $this->renderAuthor(),
26 $this->renderObject());
29 public function hasChangeDetailView() {
30 return true;
33 public function getMailDiffSectionHeader() {
34 return pht('CHANGES TO POST CONTENT');
37 public function newChangeDetailView() {
38 $viewer = $this->getViewer();
40 return id(new PhabricatorApplicationTransactionTextDiffDetailView())
41 ->setViewer($viewer)
42 ->setOldText($this->getOldValue())
43 ->setNewText($this->getNewValue());
46 public function newRemarkupChanges() {
47 $changes = array();
49 $changes[] = $this->newRemarkupChange()
50 ->setOldValue($this->getOldValue())
51 ->setNewValue($this->getNewValue());
53 return $changes;
56 public function getIcon() {
57 return 'fa-file-text-o';