Beispiel #1
0
 /**
  * Return render value
  * (non-PHPdoc)
  * @see \Engine\Crud\Grid\Column::render()
  * @param mixed $row
  * @return string
  */
 public function render($row)
 {
     $value = parent::render($row);
     if ($value !== '') {
         if (isset($this->_options[$value])) {
             $value = $this->_options[$value];
         }
     } else {
         $value = $this->_na;
     }
     return $value;
 }
Beispiel #2
0
 public static function blockTagcloud($taglist)
 {
     $max = current($taglist)['count'];
     $min = end($taglist)['count'];
     shuffle($taglist);
     foreach ($taglist as &$tag) {
         $size_factor = (\Config::instance()->tagcloud_spread - 1) / ($min == $max ? 1 : $max - $min) * ($tag['count'] - $min) + 1;
         $tag['z_index'] = $max - $tag['count'];
         $tag['percent'] = intval(\Config::instance()->tagcloud_basesize * $size_factor);
     }
     \Base::instance()->set('renderData', $taglist);
     return parent::render('story/block.tagcloud.html');
 }
Beispiel #3
0
 public static function categories($data)
 {
     $cell = array("ID" => "sb_cell_categories", "TITLE" => \Base::instance()->get("LN__Categories"), "CONTENT" => $data);
     \Base::instance()->set('cell', $cell);
     return parent::render('blocks/categories.html');
 }
Beispiel #4
0
 public function render($view, $data = [])
 {
     parent::render('app/' . $view, $data);
 }