1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/view/layout/PhabricatorPinboardView.php

38 lines
850 B
PHP
Raw Normal View History

<?php
final class PhabricatorPinboardView extends AphrontView {
private $items = array();
private $noDataString;
public function setNoDataString($no_data_string) {
$this->noDataString = $no_data_string;
return $this;
}
public function addItem(PhabricatorPinboardItemView $item) {
$this->items[] = $item;
return $this;
}
public function render() {
require_celerity_resource('phabricator-pinboard-view-css');
if (!$this->items) {
$string = nonempty($this->noDataString, pht('No data.'));
return id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NODATA)
->appendChild($string)
->render();
}
return phutil_tag(
'div',
array(
'class' => 'phabricator-pinboard-view',
),
2013-02-13 23:50:15 +01:00
$this->renderSingleView($this->items));
}
}