You are here

protected function WebformOptionsCustom::defineDefaultProperties 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::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_options_custom/src/Plugin/WebformElement/WebformOptionsCustom.php, line 32

Class

WebformOptionsCustom
Provides a custom options element.

Namespace

Drupal\webform_options_custom\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    // Options settings.
    'multiple' => FALSE,
    'multiple_error' => '',
    'empty_option' => '',
    'empty_value' => '',
    'select2' => FALSE,
    'choices' => FALSE,
    'chosen' => FALSE,
    'placeholder' => '',
    'help_display' => '',
    'size' => '',
    'options_custom' => '',
    'options_description_display' => TRUE,
  ] + parent::defineDefaultProperties();
  unset($properties['options_randomize']);
  return $properties;
}