Completed
Push — master ( b569b1...d88325 )
by Jean-Christophe
03:46
created

SemanticHtmlCollectionsTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
addHtmlComponent() 0 1 ?
A htmlCheckbox() 0 3 1
A htmlTable() 0 3 1
1
<?php
2
namespace Ajax\semantic\traits;
3
4
use Ajax\semantic\html\collections\form\HtmlFormCheckbox;
5
use Ajax\semantic\html\base\constants\CheckboxType;
6
use Ajax\semantic\html\collections\HtmlTable;
7
8
9
trait SemanticHtmlCollectionsTrait {
10
11
	public abstract function addHtmlComponent($htmlComponent);
12
13
	/**
14
	 * Module checkbox
15
	 * @param string $identifier
16
	 * @param string $label
17
	 * @param mixed $value
18
	 * @param CheckboxType $type
19
	 */
20
	public function htmlCheckbox($identifier, $label=NULL,$value=NULL,$type=NULL){
21
		return $this->addHtmlComponent(new HtmlFormCheckbox($identifier,$label,$value,$type));
22
	}
23
24
	/**
25
	 * @param string $identifier
26
	 * @param int $rowCount
27
	 * @param int $colCount
28
	 */
29
	public function htmlTable($identifier, $rowCount, $colCount){
30
		return $this->addHtmlComponent(new HtmlTable($identifier, $rowCount, $colCount));
31
	}
32
}