Completed
Push — master ( 8e32f8...32ad89 )
by Jean-Christophe
03:26
created

Dropdown::setAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Ajax\semantic\components;
4
5
use Ajax\JsUtils;
6
use Ajax\common\components\SimpleExtComponent;
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
}