You are here

public static function WebformAutocomplete::preRenderWebformAutocomplete in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Element/WebformAutocomplete.php \Drupal\webform\Element\WebformAutocomplete::preRenderWebformAutocomplete()

Prepares a #type 'webform_autocomplete' render element for input.html.twig.

Parameters

array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #size, #maxlength, #placeholder, #required, #attributes.

Return value

array The $element with prepared variables ready for input.html.twig.

File

src/Element/WebformAutocomplete.php, line 36

Class

WebformAutocomplete
Provides a one-line text field with autocompletion webform element.

Namespace

Drupal\webform\Element

Code

public static function preRenderWebformAutocomplete($element) {
  static::setAttributes($element, [
    'webform-autocomplete',
  ]);
  return $element;
}