3 final class FundInitiativeRisksTransaction
4 extends FundInitiativeTransactionType
{
6 const TRANSACTIONTYPE
= 'fund:risks';
8 public function generateOldValue($object) {
9 return $object->getRisks();
12 public function applyInternalEffects($object, $value) {
13 $object->setRisks($value);
16 public function shouldHide() {
17 $old = $this->getOldValue();
18 $new = $this->getNewValue();
19 if (!strlen($old) && !strlen($new)) {
25 public function getTitle() {
26 $old = $this->getOldValue();
27 $new = $this->getNewValue();
31 '%s set the initiative risks/challenges.',
32 $this->renderAuthor());
35 '%s updated the initiative risks/challenges.',
36 $this->renderAuthor());
41 public function getTitleForFeed() {
43 '%s updated the initiative risks/challenges for %s.',
44 $this->renderAuthor(),
45 $this->renderObject());
48 public function hasChangeDetailView() {
52 public function getMailDiffSectionHeader() {
53 return pht('CHANGES TO INITIATIVE RISKS/CHALLENGES');
56 public function newChangeDetailView() {
57 $viewer = $this->getViewer();
59 return id(new PhabricatorApplicationTransactionTextDiffDetailView())
61 ->setOldText($this->getOldValue())
62 ->setNewText($this->getNewValue());
65 public function newRemarkupChanges() {
68 $changes[] = $this->newRemarkupChange()
69 ->setOldValue($this->getOldValue())
70 ->setNewValue($this->getNewValue());
75 public function getIcon() {
76 return 'fa-ambulance';