Completed
Push — master ( b0560a...f1cdc4 )
by Jean-Christophe
03:54
created

HtmlSearch::createResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Ajax\semantic\html\modules;
4
5
use Ajax\semantic\html\base\HtmlSemDoubleElement;
6
use Ajax\semantic\html\elements\HtmlInput;
7
8
class HtmlSearch extends HtmlSemDoubleElement {
9
10
	public function __construct($identifier, $placeholder="") {
11
		parent::__construct("search-" . $identifier, "div", "ui search", array ());
12
		$this->createField();
13
		$this->createResult();
14
	}
15
16
	private function createField() {
17
		$this->content["field"]=new HtmlInput($this->identifier);
18
		return $this->content["field"];
19
	}
20
21
	private function createResult() {
22
		$this->content["result"]=new HtmlSemDoubleElement("results-" . $this->identifier, "div", "results");
23
		return $this->content["result"];
24
	}
25
}