Path: blob/master/src/applications/passphrase/xaction/PassphraseCredentialConduitTransaction.php
12256 views
<?php12final class PassphraseCredentialConduitTransaction3extends PassphraseCredentialTransactionType {45const TRANSACTIONTYPE = 'passphrase:conduit';67public function generateOldValue($object) {8return $object->getAllowConduit();9}1011public function applyInternalEffects($object, $value) {12$object->setAllowConduit((int)$value);13}1415public function getTitle() {16$new = $this->getNewValue();17if ($new) {18return pht(19'%s allowed Conduit API access to this credential.',20$this->renderAuthor());21} else {22return pht(23'%s disallowed Conduit API access to this credential.',24$this->renderAuthor());25}26}2728public function getTitleForFeed() {29$new = $this->getNewValue();30if ($new) {31return pht(32'%s allowed Conduit API access to credential %s.',33$this->renderAuthor(),34$this->renderObject());35} else {36return pht(37'%s disallowed Conduit API access to credential %s.',38$this->renderAuthor(),39$this->renderObject());40}41}4243public function getIcon() {44$new = $this->getNewValue();45if ($new) {46return 'fa-tty';47} else {48return 'fa-ban';49}50}5152}535455