Differential D17020 Diff 41522 src/applications/release/xaction/ReleaseChangeRequestDescribeTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/release/xaction/ReleaseChangeRequestDescribeTransaction.php
- This file was added.
<?php | |||||
final class ReleaseChangeRequestDescribeTransaction | |||||
extends ReleaseChangeRequestTransactionType { | |||||
const TRANSACTIONTYPE = 'change:describe'; | |||||
public function generateOldValue($object) { | |||||
return $object->getDescription(); | |||||
} | |||||
public function applyInternalEffects($object, $value) { | |||||
$object->setDescription($value); | |||||
} | |||||
public function getTitle() { | |||||
return pht( | |||||
'%s edited the Request\'s description.', | |||||
$this->renderAuthor()); | |||||
} | |||||
public function getTitleForFeed() { | |||||
return pht( | |||||
'%s edited the description of %s.', | |||||
$this->renderAuthor(), | |||||
$this->renderObject()); | |||||
} | |||||
public function hasChangeDetailView() { | |||||
return ($this->getOldValue() !== null); | |||||
} | |||||
public function newChangeDetailView() { | |||||
$viewer = $this->getViewer(); | |||||
return id(new PhabricatorApplicationTransactionTextDiffDetailView()) | |||||
->setViewer($viewer) | |||||
->setOldText($this->getOldValue()) | |||||
->setNewText($this->getNewValue()); | |||||
} | |||||
} |