# shiftcontroller/4.9.95/hc3/ui/element/input/textarea.php

ShiftController Employee Shift Scheduling, version 4.9.95. 38 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.95/code/hc3/ui/element/input/textarea.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.95/raw/hc3/ui/element/input/textarea.php
- Modified: 2018-10-18T08:34:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shiftcontroller/4.9.95/code/hc3/ui/element/input/textarea.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
class HC3_Ui_Element_Input_Textarea extends HC3_Ui_Abstract_Input
{
	protected $el = 'input';
	protected $uiType = 'input/textarea';

	public function setRows( $rows )
	{
		$this->addAttr('rows', $rows);
		return $this;
	}

	public function render()
	{
		$out = $this->htmlFactory->makeElement('textarea', $this->value )
			->addAttr('name', $this->htmlName() )
			->addAttr('class', 'hc-field')
			// ->addAttr('class', 'hc-block')
			->addAttr('class', 'hc-full-width')
			;

		$attr = $this->getAttr();
		foreach( $attr as $k => $v ){
			$out->addAttr( $k, $v );
		}

		$out->addAttr('id', $this->htmlId());

		if( strlen($this->label) ){
			// $out
			// 	->addAttr('placeholder', $this->label)
			// 	;
			$out = $this->htmlFactory->makeLabelled( $this->label, $out, $this->htmlId() );
		}

		return $out;
	}
}
```
