Path: blob/master/src/applications/passphrase/xaction/PassphraseCredentialDescriptionTransaction.php
12256 views
<?php12final class PassphraseCredentialDescriptionTransaction3extends PassphraseCredentialTransactionType {45const TRANSACTIONTYPE = 'passphrase: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();17if (!strlen($old)) {18return true;19}20return false;21}2223public function getTitle() {24return pht(25'%s updated the description for this credential.',26$this->renderAuthor());27}2829public function getTitleForFeed() {30return pht(31'%s updated the description for credential %s.',32$this->renderAuthor(),33$this->renderObject());34}3536public function hasChangeDetailView() {37return true;38}3940public function getMailDiffSectionHeader() {41return pht('CHANGES TO CREDENTIAL DESCRIPTION');42}4344public function newChangeDetailView() {45$viewer = $this->getViewer();4647return id(new PhabricatorApplicationTransactionTextDiffDetailView())48->setViewer($viewer)49->setOldText($this->getOldValue())50->setNewText($this->getNewValue());51}5253public function newRemarkupChanges() {54$changes = array();5556$changes[] = $this->newRemarkupChange()57->setOldValue($this->getOldValue())58->setNewValue($this->getNewValue());5960return $changes;61}6263}646566