Code Duplication    Length = 16-26 lines in 4 locations

Ajax/semantic/components/Accordion.php 1 location

@@ 8-29 (lines=22) @@
5
use Ajax\common\components\SimpleExtComponent;
6
use Ajax\JsUtils;
7
8
class Accordion extends SimpleExtComponent {
9
10
	public function __construct(JsUtils $js) {
11
		parent::__construct($js);
12
		$this->uiName="accordion";
13
	}
14
15
	/**
16
	 *
17
	 * @param string $value default : click
18
	 * @return $this
19
	 */
20
	public function setOn($value="click") {
21
		return $this->setParam("on", $value);
22
	}
23
24
	public function setExclusive($value=true) {
25
		return $this->setParam("exclusive", $value);
26
	}
27
28
	//TODO other events implementation
29
}

Ajax/ui/components/Buttonset.php 1 location

@@ 13-38 (lines=26) @@
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
	 * @param Boolean $value default : false
23
	 * @return $this
24
	 */
25
	public function setDisabled($value) {
26
		return $this->setParamCtrl("disabled", $value, "is_bool");
27
	}
28
29
	/**
30
	 * Which descendant elements to convert manage as buttons.
31
	 * default : "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
32
	 * @param String $value
33
	 * @return $this
34
	 */
35
	public function setItems($value) {
36
		return $this->setParam("items", $value);
37
	}
38
}

Ajax/ui/components/Slider.php 1 location

@@ 13-28 (lines=16) @@
10
 * @author jc
11
 * @version 1.001
12
 */
13
class Slider extends SimpleComponent {
14
15
	public function __construct(JsUtils $js) {
16
		parent::__construct($js);
17
		$this->uiName="slider";
18
		$this->setParam("value", 0);
19
	}
20
21
	public function onChange($jsCode) {
22
		return $this->addEvent("change", $jsCode);
23
	}
24
25
	public function onSlide($jsCode) {
26
		return $this->addEvent("slide", $jsCode);
27
	}
28
}

Ajax/semantic/components/Sticky.php 1 location

@@ 8-29 (lines=22) @@
5
use Ajax\common\components\SimpleExtComponent;
6
use Ajax\JsUtils;
7
8
class Sticky extends SimpleExtComponent {
9
10
	public function __construct(JsUtils $js) {
11
		parent::__construct($js);
12
		$this->uiName="sticky";
13
	}
14
15
	/**
16
	 *
17
	 * @param string $value default : ""
18
	 * @return $this
19
	 */
20
	public function setContext($value="") {
21
		return $this->setParam("context", $value);
22
	}
23
24
	public function setOffset($offset=0){
25
		return $this->setParam("offset", $offset);
26
	}
27
28
	//TODO other events implementation
29
}