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

Checkbox   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setOnChecked() 0 3 1
A setOnUnchecked() 0 3 1
A setOnChange() 0 3 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
}