protected function WebformToggles::defineDefaultProperties in Webform 8.5
Same name and namespace in other branches
- 6.x 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\WebformElementCode
protected function defineDefaultProperties() {
$properties = [
'toggle_theme' => 'light',
'toggle_size' => 'medium',
'on_text' => '',
'off_text' => '',
] + parent::defineDefaultProperties();
unset($properties['required'], $properties['required_message']);
return $properties;
}