Path: blob/master/src/applications/fund/xaction/FundInitiativeDescriptionTransaction.php
12256 views
<?php12final class FundInitiativeDescriptionTransaction3extends FundInitiativeTransactionType {45const TRANSACTIONTYPE = 'fund:description';67public function generateOldValue($object) {8return $object->getDescription();9}1011public function applyInternalEffects($object, $value) {12$object->setDescription($value);13}1415public function shouldHide() {16$old = $this->getOldValue();17$new = $this->getNewValue();18if (!strlen($old) && !strlen($new)) {19return true;20}21return false;22}2324public function getTitle() {25$old = $this->getOldValue();26$new = $this->getNewValue();2728if ($old === null) {29return pht(30'%s set the initiative description.',31$this->renderAuthor());32} else {33return pht(34'%s updated the initiative description.',35$this->renderAuthor());36}37}3839public function getTitleForFeed() {40return pht(41'%s updated the initiative description for %s.',42$this->renderAuthor(),43$this->renderObject());44}4546public function hasChangeDetailView() {47return true;48}4950public function getMailDiffSectionHeader() {51return pht('CHANGES TO INITIATIVE DESCRIPTION');52}5354public function newChangeDetailView() {55$viewer = $this->getViewer();5657return id(new PhabricatorApplicationTransactionTextDiffDetailView())58->setViewer($viewer)59->setOldText($this->getOldValue())60->setNewText($this->getNewValue());61}6263public function newRemarkupChanges() {64$changes = array();6566$changes[] = $this->newRemarkupChange()67->setOldValue($this->getOldValue())68->setNewValue($this->getNewValue());6970return $changes;71}727374}757677