コード例 #1
0
 /**
  * Overridden implementation of setValue which sets the 'value' of the 
  * attribute for the ZFormWebElement
  *
  * @param string $value
  * @return void
  */
 public function setValue($value)
 {
     parent::setValue($value);
     if ($value) {
         $this->checked = true;
     } else {
         unset($this->_attributes['checked']);
     }
 }
コード例 #2
0
 /**
  * Overrides setValue in the parent to also set the checked status of
  * the ZCheckBox.
  */
 public function setValue($value)
 {
     parent::setValue($value);
     if ($value) {
         $this->setChecked(true);
     } else {
         $this->setChecked(false);
     }
 }