@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at upstream/main 53 lines 1.2 kB view raw
1<?php 2 3final class PassphraseCredentialConduitTransaction 4 extends PassphraseCredentialTransactionType { 5 6 const TRANSACTIONTYPE = 'passphrase:conduit'; 7 8 public function generateOldValue($object) { 9 return $object->getAllowConduit(); 10 } 11 12 public function applyInternalEffects($object, $value) { 13 $object->setAllowConduit((int)$value); 14 } 15 16 public function getTitle() { 17 $new = $this->getNewValue(); 18 if ($new) { 19 return pht( 20 '%s allowed Conduit API access to this credential.', 21 $this->renderAuthor()); 22 } else { 23 return pht( 24 '%s disallowed Conduit API access to this credential.', 25 $this->renderAuthor()); 26 } 27 } 28 29 public function getTitleForFeed() { 30 $new = $this->getNewValue(); 31 if ($new) { 32 return pht( 33 '%s allowed Conduit API access to credential %s.', 34 $this->renderAuthor(), 35 $this->renderObject()); 36 } else { 37 return pht( 38 '%s disallowed Conduit API access to credential %s.', 39 $this->renderAuthor(), 40 $this->renderObject()); 41 } 42 } 43 44 public function getIcon() { 45 $new = $this->getNewValue(); 46 if ($new) { 47 return 'fa-tty'; 48 } else { 49 return 'fa-ban'; 50 } 51 } 52 53}