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

HtmlFormCheckbox::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 2
eloc 9
nc 2
nop 3
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
}