You are here

public function WebformImageSelect::initialize in Webform 6.x

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

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

Parameters

array $element: An element.

Overrides WebformElementBase::initialize

File

modules/webform_image_select/src/Plugin/WebformElement/WebformImageSelect.php, line 92

Class

WebformImageSelect
Provides a 'image_select' element.

Namespace

Drupal\webform_image_select\Plugin\WebformElement

Code

public function initialize(array &$element) {

  // Set element images.
  $element['#images'] = WebformImageSelectImages::getElementImages($element);
  WebformImageSelectElement::setOptions($element);
  parent::initialize($element);
}