예제 #1
0
파일: Select.php 프로젝트: rtsantos/mais
 /**
  * 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();
 }
예제 #2
0
파일: Button.php 프로젝트: rtsantos/mais
 /**
  * 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();
 }
예제 #3
0
파일: Toolbar.php 프로젝트: rtsantos/mais
 /**
  * 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>';
 }