@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
at recaptime-dev/main 32 lines 672 B view raw
1<?php 2 3final class PhabricatorContentSourceView extends AphrontView { 4 5 private $contentSource; 6 7 public function setContentSource(PhabricatorContentSource $content_source) { 8 $this->contentSource = $content_source; 9 return $this; 10 } 11 12 public function getSourceName() { 13 return $this->contentSource->getSourceName(); 14 } 15 16 public function render() { 17 require_celerity_resource('phabricator-content-source-view-css'); 18 19 $name = $this->getSourceName(); 20 if ($name === null) { 21 return null; 22 } 23 24 return phutil_tag( 25 'span', 26 array( 27 'class' => 'phabricator-content-source-view', 28 ), 29 pht('Via %s', $name)); 30 } 31 32}