Passed
Push — master ( cd7b92...8b3dbf )
by Jean-Christophe
03:06
created

Dropdown::setAllowAdditions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Ajax\semantic\components;
4
5
use Ajax\JsUtils;
6
7
class Dropdown extends SimpleSemExtComponent {
8
9
	public function __construct(JsUtils $js) {
10
		parent::__construct($js);
11
		$this->uiName="dropdown";
12
	}
13
14
	/**
15
	 * Sets a default action to occur
16
	 * @param string $action one of "select","auto","activate","combo","nothing","hide"
17
	 * @return \Ajax\semantic\components\Dropdown
18
	 */
19
	public function setAction($action){
20
		return $this->setParamCtrl("action", $action,array("select","auto","activate","combo","nothing","hide"));
21
	}
22
23
	/**
24
	 * Define the event which trigger dropdown
25
	 * @param string $event Event used to trigger dropdown (Hover, Click, Custom Event)
26
	 * @return \Ajax\semantic\components\Dropdown
27
	 */
28
	public function setOn($event){
29
		return $this->setParam("on", $event);
30
	}
31
32
	public function setFullTextSearch($value){
33
		return $this->setParam("fullTextSearch", $value);
34
	}
35
36
	public function setShowOnFocus($value){
37
		return $this->setParam("showOnFocus", $value);
38
	}
39
	
40
	public function setAllowAdditions($value){
41
		return $this->setParam("allowAdditions", $value);
42
	}
43
}
44