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:
8: namespace Nette\Forms\Controls;
9:
10: use Nette;
11:
12:
13: /**
14: * Multiline text input control.
15: */
16: class TextArea extends TextBase
17: {
18:
19: /**
20: * @param string|object
21: */
22: public function __construct($label = null)
23: {
24: parent::__construct($label);
25: $this->control->setName('textarea');
26: $this->setOption('type', 'textarea');
27: }
28:
29:
30: /**
31: * Generates control's HTML element.
32: * @return Nette\Utils\Html
33: */
34: public function getControl()
35: {
36: return parent::getControl()
37: ->setText($this->getRenderedValue());
38: }
39: }
40: