Ajax/semantic/html/collections/form/traits/CheckboxTrait.php 1 location
|
@@ 56-63 (lines=8) @@
|
| 53 |
|
* @param boolean $value |
| 54 |
|
* @return \Ajax\semantic\html\collections\form\traits\CheckboxTrait |
| 55 |
|
*/ |
| 56 |
|
public function setChecked($value=true){ |
| 57 |
|
if($value===true){ |
| 58 |
|
$this->getDataField()->setProperty("checked", "checked"); |
| 59 |
|
}else{ |
| 60 |
|
$this->getDataField()->removeProperty("checked"); |
| 61 |
|
} |
| 62 |
|
return $this; |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
} |
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 1 location
|
@@ 20-27 (lines=8) @@
|
| 17 |
|
$this->setLabel($label); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function setChecked($value=true){ |
| 21 |
|
if($value===true){ |
| 22 |
|
$this->getField()->setProperty("checked", "checked"); |
| 23 |
|
}else{ |
| 24 |
|
$this->getField()->removeProperty("checked"); |
| 25 |
|
} |
| 26 |
|
return $this; |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
public function setType($checkboxType) { |
| 30 |
|
return $this->addToPropertyCtrl("class", $checkboxType, CheckboxType::getConstants()); |