Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/xaction/HeraldRuleEditTransaction.php
Show All 34 Lines | final class HeraldRuleEditTransaction | ||||
public function hasChangeDetailView() { | public function hasChangeDetailView() { | ||||
return true; | return true; | ||||
} | } | ||||
public function newChangeDetailView() { | public function newChangeDetailView() { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$old = $this->getOldValue(); | return id(new PhabricatorApplicationTransactionJSONDiffDetailView()) | ||||
$new = $this->getNewValue(); | |||||
$json = new PhutilJSON(); | |||||
$old_json = $json->encodeFormatted($old); | |||||
$new_json = $json->encodeFormatted($new); | |||||
return id(new PhabricatorApplicationTransactionTextDiffDetailView()) | |||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setOldText($old_json) | ->setOld($this->getOldValue()) | ||||
->setNewText($new_json); | ->setNew($this->getNewValue()); | ||||
} | } | ||||
} | } |