| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | namespace Atk4\Ui\Form\Control; |
| 6: | |
| 7: | class Textarea extends Input |
| 8: | { |
| 9: | |
| 10: | public $rows = 2; |
| 11: | |
| 12: | #[\Override] |
| 13: | public function getInput() |
| 14: | { |
| 15: | return $this->getApp()->getTag('textarea', array_merge([ |
| 16: | 'name' => $this->shortName, |
| 17: | 'rows' => $this->rows, |
| 18: | 'placeholder' => $this->placeholder, |
| 19: | 'id' => $this->name . '_input', |
| 20: | 'disabled' => $this->disabled, |
| 21: | 'readonly' => $this->readOnly && !$this->disabled, |
| 22: | ], $this->inputAttr), $this->getValue() ?? ''); |
| 23: | } |
| 24: | } |
| 25: | |