public function YamlFormToggle::getDefaultProperties in YAML Form 8
Same name in this branch
- 8 src/Element/YamlFormToggle.php \Drupal\yamlform\Element\YamlFormToggle::getDefaultProperties()
- 8 src/Plugin/YamlFormElement/YamlFormToggle.php \Drupal\yamlform\Plugin\YamlFormElement\YamlFormToggle::getDefaultProperties()
Only a few elements don't inherit these default properties.
Overrides Checkbox::getDefaultProperties
See also
\Drupal\yamlform\Plugin\YamlFormElement\Textarea
\Drupal\yamlform\Plugin\YamlFormElement\YamlFormLikert
\Drupal\yamlform\Plugin\YamlFormElement\YamlFormCompositeBase
\Drupal\yamlform\Plugin\YamlFormElement\ContainerBase
File
- src/
Plugin/ YamlFormElement/ YamlFormToggle.php, line 21
Class
- YamlFormToggle
- Provides a 'toggle' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function getDefaultProperties() {
$properties = parent::getDefaultProperties() + [
'toggle_theme' => 'light',
'toggle_size' => 'medium',
'on_text' => '',
'off_text' => '',
];
$properties['title_display'] = 'after';
return $properties;
}