protected function WebformImageSelect::defineDefaultProperties 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::defineDefaultProperties()
Define an element's default properties.
Return value
array An associative array contain an the element's default properties.
Overrides Select::defineDefaultProperties
File
- modules/
webform_image_select/ src/ Plugin/ WebformElement/ WebformImageSelect.php, line 27
Class
- WebformImageSelect
- Provides a 'image_select' element.
Namespace
Drupal\webform_image_select\Plugin\WebformElementCode
protected function defineDefaultProperties() {
$properties = [
'images' => [],
'images_randomize' => FALSE,
'show_label' => FALSE,
'filter' => FALSE,
'filter__placeholder' => (string) $this
->t('Filter images by label'),
'filter__singlular' => (string) $this
->t('image'),
'filter__plural' => (string) $this
->t('images'),
'filter__no_results' => (string) $this
->t('No images found.'),
] + parent::defineDefaultProperties();
unset($properties['options'], $properties['options_randomize'], $properties['field_prefix'], $properties['field_suffix'], $properties['disabled'], $properties['select2']);
return $properties;
}