Path: blob/master/src/applications/passphrase/xaction/PassphraseCredentialSecretIDTransaction.php
12256 views
<?php12final class PassphraseCredentialSecretIDTransaction3extends PassphraseCredentialTransactionType {45const TRANSACTIONTYPE = 'passphrase:secretID';67public function generateOldValue($object) {8return $object->getSecretID();9}1011public function applyInternalEffects($object, $value) {12$old_id = $object->getSecretID();13if ($old_id) {14$this->destroySecret($old_id);15}16$object->setSecretID($value);17}1819public function getTitle() {20$old = $this->getOldValue();21if (!$old) {22return pht(23'%s attached a new secret to this credential.',24$this->renderAuthor());25} else {26return pht(27'%s updated the secret for this credential.',28$this->renderAuthor());29}30}3132public function getTitleForFeed() {33$old = $this->getOldValue();34if ($old === null) {35return pht(36'%s attached a new secret to %s.',37$this->renderAuthor(),38$this->renderObject());39} else {40return pht(41'%s updated the secret for %s.',42$this->renderAuthor(),43$this->renderObject());44}45}4647public function getIcon() {48return 'fa-key';49}5051}525354