public function WebformImageSelect::initialize in Webform 8.5
Same name and namespace in other branches
- 6.x 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 67
Class
- WebformImageSelect
- Provides a 'image_select' element.
Namespace
Drupal\webform_image_select\Plugin\WebformElementCode
public function initialize(array &$element) {
// Set element images.
$element['#images'] = WebformImageSelectImages::getElementImages($element);
WebformImageSelectElement::setOptions($element);
parent::initialize($element);
}