Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/view/phui/PHUILinkView.php
12249 views
1
<?php
2
3
final class PHUILinkView
4
extends AphrontTagView {
5
6
private $uri;
7
private $text;
8
private $workflow;
9
10
public function setURI($uri) {
11
$this->uri = $uri;
12
return $this;
13
}
14
15
public function getURI() {
16
return $this->uri;
17
}
18
19
public function setText($text) {
20
$this->text = $text;
21
return $this;
22
}
23
24
public function setWorkflow($workflow) {
25
$this->workflow = $workflow;
26
return $this;
27
}
28
29
protected function getTagName() {
30
return 'a';
31
}
32
33
protected function getTagAttributes() {
34
$sigil = array();
35
36
if ($this->workflow) {
37
$sigil[] = 'workflow';
38
}
39
40
return array(
41
'href' => $this->getURI(),
42
'sigil' => $sigil,
43
);
44
}
45
46
protected function getTagContent() {
47
return $this->text;
48
}
49
50
}
51
52