Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/infrastructure/contentsource/PhabricatorContentSourceView.php
12241 views
1
<?php
2
3
final 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
}
33
34