/**
  * Outputs the button
  */
 public function __tostring()
 {
     $class = array();
     if (!empty($this->size)) {
         $class[] = 'btn-' . $this->size;
     }
     if (!empty($this->type)) {
         $class[] = 'btn-' . $this->type;
     } else {
         $class[] = 'btn-default';
     }
     if ($this->disabled) {
         $class[] = 'disabled';
     }
     if ($this->block) {
         $class[] = 'btn-block';
     }
     if (!empty($this->icon)) {
         $this->text = EBootstrap::icon($this->icon, $this->iconWhite) . ' ' . $this->text;
     }
     EBootstrap::mergeClass($this->htmlOptions, $class);
     switch ($this->element) {
         case 'button':
             return EBootstrap::tag('button', $this->htmlOptions, $this->text) . "\n";
             break;
         default:
             return EBootstrap::link($this->text, $this->url, $this->htmlOptions) . "\n";
             break;
     }
 }