public static function WebformToggle::getDefaultProperties in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_toggles/src/Element/WebformToggle.php \Drupal\webform_toggles\Element\WebformToggle::getDefaultProperties()
Get default properties for a toggle element.
Return value
array An associative array container default properties for a toggle element.
3 calls to WebformToggle::getDefaultProperties()
- WebformToggle::getInfo in modules/
webform_toggles/ src/ Element/ WebformToggle.php - Returns the element properties for this element.
- WebformToggles::getInfo in modules/
webform_toggles/ src/ Element/ WebformToggles.php - Returns the element properties for this element.
- WebformToggles::processCheckboxes in modules/
webform_toggles/ src/ Element/ WebformToggles.php - Processes a checkboxes form element.
File
- modules/
webform_toggles/ src/ Element/ WebformToggle.php, line 27
Class
- WebformToggle
- Provides a webform element for entering a toggle.
Namespace
Drupal\webform_toggles\ElementCode
public static function getDefaultProperties() {
return [
'#toggle_theme' => 'light',
'#toggle_size' => 'medium',
'#on_text' => '',
'#off_text' => '',
];
}