Completed
Push — master ( 966ba4...93b0d7 )
by Jean-Christophe
02:34
created

Dropdown   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 33
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setAction() 0 3 1
A setOn() 0 3 1
A setFullTextSearch() 0 3 1
A setShowOnFocus() 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 Dropdown extends SimpleExtComponent {
9
10
	public function __construct(JsUtils $js) {
11
		parent::__construct($js);
12
		$this->uiName="dropdown";
13
	}
14
15
	/**
16
	 * Sets a default action to occur
17
	 * @param string $action one of "select","auto","activate","combo","nothing","hide"
18
	 * @return \Ajax\semantic\components\Dropdown
19
	 */
20
	public function setAction($action){
21
		return $this->setParamCtrl("action", $action,array("select","auto","activate","combo","nothing","hide"));
22
	}
23
24
	/**
25
	 * Define the event which trigger dropdown
26
	 * @param string $event Event used to trigger dropdown (Hover, Click, Custom Event)
27
	 * @return \Ajax\semantic\components\Dropdown
28
	 */
29
	public function setOn($event){
30
		return $this->setParam("on", $event);
31
	}
32
33
	public function setFullTextSearch($value){
34
		return $this->setParam("fullTextSearch", $value);
35
	}
36
37
	public function setShowOnFocus($value){
38
		return $this->setParam("showOnFocus", $value);
39
	}
40
}
41