/** * Renderiza o botão da Toolbar * * @return string */ public function render() { $options = ''; if (count($this->_options) > 0) { foreach ($this->_options as $key => $value) { if ($this->_value == $key) { $options .= '<option value="' . $key . '" selected>' . $value . '</option>'; } else { $options .= '<option value="' . $key . '">' . $value . '</option>'; } } } $this->setAttr('value', $options); return parent::render(); }
/** * Renderiza o botão da Toolbar * * @return string */ public function render() { $this->createJS(); $value = $this->getCaption(); if ($this->getIcon()) { //$this->addClass('ui-button-text-icon-primary'); $value = ' <span class="ui-icon ' . $this->getIcon() . '"></span> <span class="ui-text">' . $value . '</span> '; } else { //$this->addClass('ui-button-text-only'); $value = '<span class="ui-text">' . $value . '</span>'; } $this->setAttr('value', $value); return parent::render(); }
/** * Renderiza o objeto para uma string html */ public function render() { $this->_attribs['value'] = ''; if ($this->_object) { foreach ($this->_object as $name => $value) { $this->_attribs['value'] .= $value->render(); } } for ($i = 0; $i < count($this->_buttons); $i++) { $name = $this->_buttonsOrder[$i]; if ($this->_float) { $this->_buttons[$name]->addStyle('float', $this->_float); } $this->_attribs['value'] .= $this->_buttons[$name]->render(); } return parent::render() . '<div style="clear: both;"></div>'; }