Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/diviner/view/DivinerSectionView.php
12256 views
1
<?php
2
3
final class DivinerSectionView extends AphrontTagView {
4
5
private $header;
6
private $content;
7
8
public function addContent($content) {
9
$this->content[] = $content;
10
return $this;
11
}
12
13
public function setHeader($text) {
14
$this->header = $text;
15
return $this;
16
}
17
18
protected function getTagName() {
19
return 'div';
20
}
21
22
protected function getTagAttributes() {
23
return array(
24
'class' => 'diviner-document-section',
25
);
26
}
27
28
protected function getTagContent() {
29
require_celerity_resource('diviner-shared-css');
30
31
$header = id(new PHUIHeaderView())
32
->setBleedHeader(true)
33
->addClass('diviner-section-header')
34
->setHeader($this->header);
35
36
$content = phutil_tag_div('diviner-section-content', $this->content);
37
38
return array($header, $content);
39
}
40
41
}
42
43