1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00
phorge-phorge/src/applications/diviner/view/DivinerSectionView.php

42 lines
822 B
PHP
Raw Normal View History

<?php
final class DivinerSectionView extends AphrontTagView {
private $header;
private $content;
public function addContent($content) {
$this->content[] = $content;
return $this;
}
public function setHeader($text) {
$this->header = $text;
return $this;
}
protected function getTagName() {
return 'div';
}
protected function getTagAttributes() {
return array(
'class' => 'diviner-document-section',
);
}
protected function getTagContent() {
require_celerity_resource('diviner-shared-css');
$header = id(new PHUIHeaderView())
->setBleedHeader(true)
->addClass('diviner-section-header')
->setHeader($this->header);
$content = phutil_tag_div('diviner-section-content', $this->content);
return array($header, $content);
}
}