mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 18:52:42 +01:00
8434143795
Summary: Ref T6822. Test Plan: `grep` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11368
43 lines
870 B
PHP
43 lines
870 B
PHP
<?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)
|
|
->setHeader($this->header);
|
|
|
|
$content = id(new PHUIBoxView())
|
|
->addPadding(PHUI::PADDING_LARGE_LEFT)
|
|
->addPadding(PHUI::PADDING_LARGE_RIGHT)
|
|
->appendChild($this->content);
|
|
|
|
return array($header, $content);
|
|
}
|
|
|
|
}
|