Differential D19992 Diff 47751 src/applications/auth/xaction/PhabricatorAuthMessageTextTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/xaction/PhabricatorAuthMessageTextTransaction.php
- This file was added.
<?php | |||||
final class PhabricatorAuthMessageTextTransaction | |||||
extends PhabricatorAuthMessageTransactionType { | |||||
const TRANSACTIONTYPE = 'text'; | |||||
public function generateOldValue($object) { | |||||
return $object->getMessageText(); | |||||
} | |||||
public function applyInternalEffects($object, $value) { | |||||
$object->setMessageText($value); | |||||
} | |||||
public function getTitle() { | |||||
return pht( | |||||
'%s updated the message text.', | |||||
$this->renderAuthor()); | |||||
} | |||||
public function hasChangeDetailView() { | |||||
return true; | |||||
} | |||||
public function getMailDiffSectionHeader() { | |||||
return pht('CHANGES TO MESSAGE'); | |||||
} | |||||
public function newChangeDetailView() { | |||||
$viewer = $this->getViewer(); | |||||
return id(new PhabricatorApplicationTransactionTextDiffDetailView()) | |||||
->setViewer($viewer) | |||||
->setOldText($this->getOldValue()) | |||||
->setNewText($this->getNewValue()); | |||||
} | |||||
} |