You are here

public static function WebformEmailMultiple::preRenderWebformEmailMultiple in Webform 8.5

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

Prepares a #type 'webform_email_multiple' render element for theme_element().

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 theme_element().

File

src/Element/WebformEmailMultiple.php, line 112

Class

WebformEmailMultiple
Provides a webform element for entering multiple comma delimited email addresses.

Namespace

Drupal\webform\Element

Code

public static function preRenderWebformEmailMultiple(array $element) {
  $element['#attributes']['type'] = 'text';
  Element::setAttributes($element, [
    'id',
    'name',
    'value',
    'size',
    'maxlength',
    'placeholder',
  ]);
  static::setAttributes($element, [
    'form-text',
    'webform-email-multiple',
  ]);
  return $element;
}