ACC SHELL
<?php
/**
* This file is part of the Nette Framework (http://nette.org)
* Copyright (c) 2004 David Grudl (http://davidgrudl.com)
* @package Nette\Forms\Controls
*/
/**
* Multiline text input control.
*
* @author David Grudl
* @package Nette\Forms\Controls
*/
class NTextArea extends NTextBase
{
/**
* @param string label
* @param int width of the control
* @param int height of the control in text lines
*/
public function __construct($label = NULL, $cols = NULL, $rows = NULL)
{
parent::__construct($label);
$this->control->setName('textarea');
$this->control->cols = $cols;
$this->control->rows = $rows;
}
/**
* Generates control's HTML element.
* @return NHtml
*/
public function getControl()
{
$control = parent::getControl();
$control->setText($this->getValue() === '' ? $this->translate($this->emptyValue) : $this->value);
return $control;
}
}
ACC SHELL 2018