Path: blob/master/src/applications/passphrase/xaction/PassphraseCredentialDestroyTransaction.php
12256 views
<?php12final class PassphraseCredentialDestroyTransaction3extends PassphraseCredentialTransactionType {45const TRANSACTIONTYPE = 'passphrase:destroy';67public function generateOldValue($object) {8return $object->getIsDestroyed();9}1011public function applyInternalEffects($object, $value) {12$is_destroyed = $value;13$object->setIsDestroyed($is_destroyed);14if ($is_destroyed) {15$secret_id = $object->getSecretID();16if ($secret_id) {17$this->destroySecret($secret_id);18$object->setSecretID(null);19}20}21}2223public function shouldHide() {24$new = $this->getNewValue();25if (!$new) {26return true;27}28}2930public function getTitle() {31return pht(32'%s destroyed the secret for this credential.',33$this->renderAuthor());34}3536public function getTitleForFeed() {37return pht(38'%s destroyed the secret for credential %s.',39$this->renderAuthor(),40$this->renderObject());41}4243public function getIcon() {44return 'fa-ban';45}4647public function getColor() {48return 'red';49}5051}525354