Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/view/layout/PHUICurtainPanelView.php
12241 views
1
<?php
2
3
final class PHUICurtainPanelView extends AphrontTagView {
4
5
private $order = 0;
6
private $headerText;
7
8
public function setHeaderText($header_text) {
9
$this->headerText = $header_text;
10
return $this;
11
}
12
13
public function getHeaderText() {
14
return $this->headerText;
15
}
16
17
public function setOrder($order) {
18
$this->order = $order;
19
return $this;
20
}
21
22
public function getOrder() {
23
return $this->order;
24
}
25
26
public function getOrderVector() {
27
return id(new PhutilSortVector())
28
->addInt($this->getOrder());
29
}
30
31
protected function getTagAttributes() {
32
return array(
33
'class' => 'phui-curtain-panel',
34
);
35
}
36
37
protected function getTagContent() {
38
$header = null;
39
40
$header_text = $this->getHeaderText();
41
if (strlen($header_text)) {
42
$header = phutil_tag(
43
'div',
44
array(
45
'class' => 'phui-curtain-panel-header',
46
),
47
$header_text);
48
}
49
50
$body = phutil_tag(
51
'div',
52
array(
53
'class' => 'phui-curtain-panel-body',
54
),
55
$this->renderChildren());
56
57
return array(
58
$header,
59
$body,
60
);
61
}
62
63
}
64
65