Completed
Push — master ( 49f42f...848ec5 )
by Jean-Christophe
03:06
created

HtmlFormInput::setReadonly()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Ajax\semantic\html\collections\form;
4
5
use Ajax\common\html\html5\HtmlInput;
6
use Ajax\semantic\html\collections\form\traits\TextFieldsTrait;
7
use Ajax\semantic\html\collections\form\traits\FieldTrait;
8
9
class HtmlFormInput extends HtmlFormField {
10
	use TextFieldsTrait,FieldTrait;
11
12
	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
13
		if(!isset($placeholder) && $type==="text")
14
			$placeholder=$label;
15
		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
16
	}
17
}