[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/diviner/view/ -> DivinerSectionView.php (source)

   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    public function getTagName() {
  19      return 'div';
  20    }
  21  
  22    public function getTagAttributes() {
  23      return array(
  24        'class' => 'diviner-document-section',
  25      );
  26    }
  27  
  28    public function getTagContent() {
  29      require_celerity_resource('diviner-shared-css');
  30  
  31      $header = id(new PHUIHeaderView())
  32        ->setBleedHeader(true)
  33        ->setHeader($this->header);
  34  
  35      $content = id(new PHUIBoxView())
  36        ->addPadding(PHUI::PADDING_LARGE_LEFT)
  37        ->addPadding(PHUI::PADDING_LARGE_RIGHT)
  38        ->appendChild($this->content);
  39  
  40      return array($header, $content);
  41    }
  42  
  43  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1