function renderAttributes()
 {
     if ($this->isChecked()) {
         $this->setAttribute('checked', 'checked');
     } else {
         $this->removeAttribute('checked');
     }
     parent::renderAttributes();
 }
Ejemplo n.º 2
0
 function renderAttributes()
 {
     if (!$this->hasAttribute('value')) {
         if ($value = $this->getValue()) {
             $this->setAttribute('value', $value);
         } else {
             $this->setAttribute('value', "");
         }
     }
     parent::renderAttributes();
 }
 function renderAttributes()
 {
     if ($this->logical_checked_attr) {
         $this->removeAttribute('checked');
     }
     if ($this->isChecked()) {
         $this->setAttribute('checked', 'checked');
         $this->logical_checked_attr = true;
     } else {
         $this->removeAttribute('checked');
     }
     parent::renderAttributes();
 }