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