HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
TbThumbnails.php
Go to the documentation of this file.
1 <?php
10 Yii::import('booster.widgets.TbListView');
11 
19 class TbThumbnails extends TbListView {
20 
26  public function renderItems() {
27 
28  echo CHtml::openTag($this->itemsTagName, array('class' => $this->itemsCssClass)) . "\n";
29 
30  $data = $this->dataProvider->getData();
31 
32  if (!empty($data)) {
33  echo CHtml::openTag('div', array('class' => 'row'));
34  $owner = $this->getOwner();
35  $render = $owner instanceof CController ? 'renderPartial' : 'render';
36  foreach ($data as $i => $item) {
37  $data = $this->viewData;
38  $data['index'] = $i;
39  $data['data'] = $item;
40  $data['widget'] = $this;
41  $owner->$render($this->itemView, $data);
42  }
43 
44  echo '</div>';
45  } else {
46  $this->renderEmptyText();
47  }
48 
49  echo CHtml::closeTag($this->itemsTagName);
50  }
51 }