You are here

public function WebformOptionsCustom::initialize in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_options_custom/src/Plugin/WebformElement/WebformOptionsCustom.php \Drupal\webform_options_custom\Plugin\WebformElement\WebformOptionsCustom::initialize()

Initialize an element to be displayed, rendered, or exported.

Parameters

array $element: An element.

Overrides WebformElementBase::initialize

File

modules/webform_options_custom/src/Plugin/WebformElement/WebformOptionsCustom.php, line 64

Class

WebformOptionsCustom
Provides a custom options element.

Namespace

Drupal\webform_options_custom\Plugin\WebformElement

Code

public function initialize(array &$element) {

  // Make sure the #template property is not set by the element
  // since it allows for unfiltered HTML, CSS, and JS.
  unset($element['#template']);
}