You are here

public function Textarea::preview in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElement/Textarea.php \Drupal\webform\Plugin\WebformElement\Textarea::preview()

Generate a renderable preview of the element.

Return value

array A renderable preview of the element.

Overrides WebformElementBase::preview

File

src/Plugin/WebformElement/Textarea.php, line 91

Class

Textarea
Provides a 'textarea' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function preview() {
  return parent::preview() + [
    '#rows' => 2,
  ];
}