setChecked() 공개 메소드

Sets a value indicating whether the checkbox is to be checked or not.
public setChecked ( $value )
예제 #1
0
 protected function createBooleanControl($container, $column, $record)
 {
     $value = $this->getRecordPropertyValue($column, $record);
     $control = new TCheckBox();
     $control->setChecked(TPropertyValue::ensureBoolean($value));
     $control->setCssClass('boolean-checkbox');
     $this->setDefaultProperty($container, $control, $column, $record);
     return $control;
 }
예제 #2
0
 /**
  * Sets a value indicating whether the checkbox is to be checked or not.
  * Updates checkbox checked state on the client-side if the
  * {@link setEnableUpdate EnableUpdate} property is set to true.
  * @param boolean whether the checkbox is to be checked or not.
  */
 public function setChecked($value)
 {
     $value = TPropertyValue::ensureBoolean($value);
     if (parent::getChecked() === $value) {
         return;
     }
     parent::setChecked($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         $this->getPage()->getCallbackClient()->check($this, $value);
     }
 }