Completed
Push — master ( 848ec5...d8452d )
by Jean-Christophe
02:59
created

HtmlFormTextarea::getDataField()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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