Remove product literal strings in "pht()", part 18
[phabricator.git] / src / applications / maniphest / xaction / ManiphestTaskDescriptionTransaction.php
blobfec1a87604f07f6165370bb3bfc2d74413b3ebb6
1 <?php
3 final class ManiphestTaskDescriptionTransaction
4 extends ManiphestTaskTransactionType {
6 const TRANSACTIONTYPE = 'description';
8 public function generateOldValue($object) {
9 return $object->getDescription();
12 public function applyInternalEffects($object, $value) {
13 $object->setDescription($value);
16 public function getActionName() {
17 return pht('Edited');
20 public function getTitle() {
21 return pht(
22 '%s updated the task description.',
23 $this->renderAuthor());
26 public function getTitleForFeed() {
27 return pht(
28 '%s updated the task description for %s.',
29 $this->renderAuthor(),
30 $this->renderObject());
33 public function hasChangeDetailView() {
34 return true;
37 public function getMailDiffSectionHeader() {
38 return pht('CHANGES TO TASK DESCRIPTION');
41 public function newChangeDetailView() {
42 $viewer = $this->getViewer();
44 return id(new PhabricatorApplicationTransactionTextDiffDetailView())
45 ->setViewer($viewer)
46 ->setOldText($this->getOldValue())
47 ->setNewText($this->getNewValue());
50 public function newRemarkupChanges() {
51 $changes = array();
53 $changes[] = $this->newRemarkupChange()
54 ->setOldValue($this->getOldValue())
55 ->setNewValue($this->getNewValue());
57 return $changes;
60 public function getTransactionTypeForConduit($xaction) {
61 return 'description';
64 public function getFieldValuesForConduit($xaction, $data) {
65 return array(
66 'old' => $xaction->getOldValue(),
67 'new' => $xaction->getNewValue(),