Completed
Push — master ( da7bd7...a4feba )
by Jean-Christophe
03:22
created

Checkbox::setOnChange()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Ajax\semantic\components;
4
5
use Ajax\common\components\SimpleExtComponent;
6
use Ajax\JsUtils;
7
8
class Checkbox extends SimpleExtComponent {
9
10
	public function __construct(JsUtils $js) {
11
		parent::__construct($js);
12
		$this->uiName="checkbox";
13
	}
14
15
	public function setOnChecked($value) {
16
		$this->params["onChecked"]="%function(){".$value."}%";
17
	}
18
19
	public function setOnUnchecked($value) {
20
		$this->params["onUnchecked"]="%function(){".$value."}%";
21
	}
22
23
	public function setOnChange($value){
24
		$this->params["onChange"]="%function(){".$value."}%";
25
	}
26
	//TODO other events implementation
27
}