Completed
Push — master ( 22ba15...552305 )
by Jean-Christophe
03:10
created

HtmlFormTextarea::setName()   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 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\HtmlTextarea;
7
use Ajax\semantic\html\collections\form\traits\TextFieldsTrait;
8
9
class HtmlFormTextarea extends HtmlFormField {
10
	use TextFieldsTrait;
11
12
	public function __construct($identifier, $label=NULL,$value=NULL,$placeholder=NULL,$rows=NULL) {
13
		if(!isset($placeholder))
14
			$placeholder=$label;
15
		parent::__construct("field-".$identifier, new HtmlTextarea($identifier,$value,$placeholder,$rows), $label);
16
	}
17
18
	/**
19
	 * Defines the textarea row count
20
	 * @param int $count
21
	 */
22
	public function setRows($count){
23
		$this->getField()->setRows($count);
24
	}
25
26
	public function getDataField() {
27
		return $this->content["field"];
28
	}
29
30
	public function setName($name){
31
		$this->getDataField()->setProperty("name",$name);
32
	}
33
}