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; }
/** * 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); } }