Completed
Push — master ( b49918...3cf661 )
by Jean-Christophe
03:33
created

HtmlFormInput::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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