Completed
Push — master ( 9de830...b49918 )
by Jean-Christophe
03:44
created

HtmlFormCheckbox   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 2
1
<?php
2
3
namespace Ajax\semantic\html\collections\form;
4
5
use Ajax\semantic\html\collections\form\HtmlFormInput;
6
7
class HtmlFormCheckbox extends HtmlFormInput {
8
9
	public function __construct($identifier, $label=NULL,$value=NULL) {
10
		parent::__construct($identifier, $label, "checkbox", $value=NULL);
11
		if(isset($label)){
12
			$this->swapLabel();
13
			$label=$this->getLabel();
14
			$label->setClass="hidden";
15
			$label->setProperty("tabindex",0);
16
		}
17
		$this->setClass("ui checkbox");
18
		$this->wrap("<div class='field'>","</div>");
19
	}
20
}