[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/view/phui/ -> PHUIPinboardView.php (source)

   1  <?php
   2  
   3  final class PHUIPinboardView extends AphrontView {
   4  
   5    private $items = array();
   6    private $noDataString;
   7  
   8    public function setNoDataString($no_data_string) {
   9      $this->noDataString = $no_data_string;
  10      return $this;
  11    }
  12  
  13    public function addItem(PHUIPinboardItemView $item) {
  14      $this->items[] = $item;
  15      return $this;
  16    }
  17  
  18    public function render() {
  19      require_celerity_resource('phui-pinboard-view-css');
  20  
  21      if (!$this->items) {
  22        $string = nonempty($this->noDataString, pht('No data.'));
  23        return id(new AphrontErrorView())
  24          ->setSeverity(AphrontErrorView::SEVERITY_NODATA)
  25          ->appendChild($string)
  26          ->render();
  27      }
  28  
  29      return phutil_tag(
  30        'div',
  31        array(
  32          'class' => 'phui-pinboard-view',
  33        ),
  34        $this->items);
  35    }
  36  
  37  }


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