You are here

public function WebformVariant::initialize in Webform 8.5

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

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

Parameters

array $element: An element.

Overrides WebformElementBase::initialize

File

src/Plugin/WebformElement/WebformVariant.php, line 79

Class

WebformVariant
Provides a 'webform_variant' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function initialize(array &$element) {
  if (!isset($element['#prepopulate'])) {
    $element['#prepopulate'] = TRUE;
  }
}