template_preprocess_textarea(&$variables)
Prepares variables for textarea templates.
Default template: textarea.html.twig.
array $variables: An associative array containing:
function template_preprocess_textarea(&$variables) { $element = $variables['element']; Element::setAttributes($element, array('id', 'name', 'rows', 'cols', 'placeholder')); RenderElement::setAttributes($element, array('form-textarea')); $variables['wrapper_attributes'] = new Attribute(); $variables['attributes'] = new Attribute($element['#attributes']); $variables['value'] = $element['#value']; $variables['resizable'] = !empty($element['#resizable']) ? $element['#resizable'] : NULL; $variables['required'] = !empty($element['#required']) ? $element['#required'] : NULL; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!form.inc/function/template_preprocess_textarea/8.1.x