@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.

expose renderHandle in PhabricatorModularTransactionType

Test Plan: Tested with a transactionType from an extension.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9789

Differential Revision: https://secure.phabricator.com/D16236

authored by

Aviv Eyal and committed by
avivey
05699388 989b585b

+27
+10
src/applications/phid/view/PHUIHandleView.php
··· 14 14 private $handleList; 15 15 private $handlePHID; 16 16 private $asTag; 17 + private $asText; 17 18 private $useShortName; 18 19 private $showHovercard; 19 20 ··· 32 33 return $this; 33 34 } 34 35 36 + public function setAsText($as_text) { 37 + $this->asText = $as_text; 38 + return $this; 39 + } 40 + 35 41 public function setUseShortName($short) { 36 42 $this->useShortName = $short; 37 43 return $this; ··· 53 59 } 54 60 55 61 return $tag; 62 + } 63 + 64 + if ($this->asText) { 65 + return $handle->getLinkName(); 56 66 } 57 67 58 68 if ($this->useShortName) {
+5
src/applications/transactions/storage/PhabricatorModularTransaction.php
··· 116 116 return parent::getColor(); 117 117 } 118 118 119 + public function attachViewer(PhabricatorUser $viewer) { 120 + $this->getTransactionImplementation()->setViewer($viewer); 121 + return parent::attachViewer($viewer); 122 + } 123 + 119 124 final public function hasChangeDetails() { 120 125 if ($this->getTransactionImplementation()->hasChangeDetailView()) { 121 126 return true;
+12
src/applications/transactions/storage/PhabricatorModularTransactionType.php
··· 129 129 return $this->getStorage()->renderHandleLink($object_phid); 130 130 } 131 131 132 + final protected function renderHandle($phid) { 133 + $viewer = $this->getViewer(); 134 + $display = $viewer->renderHandle($phid); 135 + 136 + $rendering_target = $this->getStorage()->getRenderingTarget(); 137 + if ($rendering_target == PhabricatorApplicationTransaction::TARGET_TEXT) { 138 + $display->setAsText(true); 139 + } 140 + 141 + return $display; 142 + } 143 + 132 144 final protected function newError($title, $message, $xaction = null) { 133 145 return new PhabricatorApplicationTransactionValidationError( 134 146 $this->getTransactionTypeConstant(),