Completed
Push — master ( 751bb4...735cac )
by Jean-Christophe
04:44
created

Search   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

5 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
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
	// TODO other events implementation
36
}