public function render() { parent::appendOption($this->_htmlOptions, 'class', $this->_cssClass); echo CHtml::openTag('li', $this->_htmlOptions); if (!empty($this->_data)) { echo '<ul>'; foreach ($this->_data as $item) { $i = $item['icon']; $l = $item['label']; $u = $item['url']; echo '<li>'; if (!empty($i)) { if (is_array($i)) { $img = CHtml::tag('img', $i, ''); } else { $img = CHtml::image($i, CHtml::encode($l)); } $l = $img . $l; } echo CHtml::link($l, $u, @$item['htmlOptions']); echo '</li>'; } echo '</ul>'; } echo CHtml::closeTag('li'); }
public function render($params = array()) { $height = CPropertyValue::ensureInteger($params['height']); $height -= $height > 40 ? 20 : 0; parent::appendOption($this->_htmlOptions, 'class', $this->_cssClass); parent::appendOption($this->_htmlOptions, 'style', 'height: ' . $height . 'px;'); echo CHtml::tag('li', $this->_htmlOptions, $this->_data); }
public function render() { $i = $this->_data['icon']; $l = $this->_data['label']; $u = $this->_data['url']; parent::appendOption($this->_htmlOptions, 'class', $this->_cssClass); echo CHtml::openTag('li', $this->_htmlOptions); if (!empty($i)) { if (is_array($i)) { $img = CHtml::tag('img', $i, ''); } else { $img = CHtml::image($i, CHtml::encode($l)); } $l = $img . CHtml::tag('div', array(), $l); } echo CHtml::link($l, $u, $this->_data['htmlOptions']); echo CHtml::closeTag('li'); }
public function render() { parent::appendOption($this->_htmlOptions, 'class', $this->_cssClass); echo CHtml::tag('li', $this->_htmlOptions); }