You are here

protected function WebformToggles::defineDefaultProperties in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_toggles/src/Plugin/WebformElement/WebformToggles.php \Drupal\webform_toggles\Plugin\WebformElement\WebformToggles::defineDefaultProperties()

Define an element's default properties.

Return value

array An associative array contain an the element's default properties.

Overrides OptionsBase::defineDefaultProperties

File

modules/webform_toggles/src/Plugin/WebformElement/WebformToggles.php, line 26

Class

WebformToggles
Provides a 'toggles' element.

Namespace

Drupal\webform_toggles\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    'toggle_theme' => 'light',
    'toggle_size' => 'medium',
    'on_text' => '',
    'off_text' => '',
  ] + parent::defineDefaultProperties();
  unset($properties['required'], $properties['required_message']);
  return $properties;
}