Completed
Push — master ( 69e9f4...3042e6 )
by Jean-Christophe
04:01
created

Search   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 6
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 34
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setSource() 0 4 1
A setType() 0 4 1
A setSearchFields() 0 4 1
A setApiSettings() 0 4 1
A setOnSelect() 0 4 1
1
<?php
2
3
namespace Ajax\semantic\components;
4
5
use Ajax\common\components\SimpleExtComponent;
6
use Ajax\JsUtils;
7
8
class Search extends SimpleExtComponent {
9
10
	public function __construct(JsUtils $js) {
11
		parent::__construct($js);
12
		$this->uiName="search";
13
	}
14
15
	public function setSource($value) {
16
		$this->params["source"]=$value;
17
		return $this;
18
	}
19
20
	public function setType($type) {
21
		$this->params["type"]=$type;
22
		return $this;
23
	}
24
25
	public function setSearchFields($fields) {
26
		$this->params["searchFields"]=$fields;
27
		return $this;
28
	}
29
30
	public function setApiSettings($value) {
31
		$this->params["apiSettings"]=$value;
32
		return $this;
33
	}
34
35
	public function setOnSelect($jsCode) {
36
		$this->params["onSelect"]=$jsCode;
37
		return $this;
38
	}
39
40
	// TODO other events implementation
41
}