Passed
Push — master ( c653a4...a7d880 )
by Jean-Christophe
02:17
created

Buttonset   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setItems() 0 2 1
A setDisabled() 0 2 1
A __construct() 0 3 1
1
<?php
2
namespace Ajax\ui\components;
3
4
use Ajax\JsUtils;
5
use Ajax\common\components\SimpleComponent;
6
7
/**
8
 * Composant JQuery UI Menu
9
 *
10
 * @author jc
11
 * @version 1.001
12
 */
13
class Buttonset extends SimpleComponent {
14
15
	public function __construct(JsUtils $js) {
16
		parent::__construct($js);
17
		$this->uiName = "buttonset";
18
	}
19
20
	/**
21
	 * Disables the buttonSet if set to true.
22
	 *
23
	 * @param Boolean $value
24
	 *        	default : false
25
	 * @return $this
26
	 */
27
	public function setDisabled($value) {
28
		return $this->setParamCtrl("disabled", $value, "is_bool");
29
	}
30
31
	/**
32
	 * Which descendant elements to convert manage as buttons.
33
	 * default : "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
34
	 *
35
	 * @param String $value
36
	 * @return $this
37
	 */
38
	public function setItems($value) {
39
		return $this->setParam("items", $value);
40
	}
41
}
42