| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* This file is part of the Nette Framework (https://nette.org) |
| 5 |
* Copyright (c) 2004 David Grudl (https://davidgrudl.com) |
| 6 |
*/ |
| 7 |
declare (strict_types=1); |
| 8 |
namespace Packetery\Nette\Forms\Controls; |
| 9 |
|
| 10 |
use Packetery\Nette; |
| 11 |
/** |
| 12 |
* Multiline text input control. |
| 13 |
*/ |
| 14 |
class TextArea extends TextBase |
| 15 |
{ |
| 16 |
/** |
| 17 |
* @param string|object $label |
| 18 |
*/ |
| 19 |
public function __construct($label = null) |
| 20 |
{ |
| 21 |
parent::__construct($label); |
| 22 |
$this->control->setName('textarea'); |
| 23 |
$this->setOption('type', 'textarea'); |
| 24 |
} |
| 25 |
public function getControl() : \Packetery\Nette\Utils\Html |
| 26 |
{ |
| 27 |
return parent::getControl()->setText((string) $this->getRenderedValue()); |
| 28 |
} |
| 29 |
} |
| 30 |
|