You are here

public static function YamlFormToggle::getDefaultProperties in YAML Form 8

Same name in this branch
  1. 8 src/Element/YamlFormToggle.php \Drupal\yamlform\Element\YamlFormToggle::getDefaultProperties()
  2. 8 src/Plugin/YamlFormElement/YamlFormToggle.php \Drupal\yamlform\Plugin\YamlFormElement\YamlFormToggle::getDefaultProperties()

Get default properties for a toggle element.

Return value

array An associative array container default properties for a toggle element.

3 calls to YamlFormToggle::getDefaultProperties()
YamlFormToggle::getInfo in src/Element/YamlFormToggle.php
Returns the element properties for this element.
YamlFormToggles::getInfo in src/Element/YamlFormToggles.php
Returns the element properties for this element.
YamlFormToggles::processCheckboxes in src/Element/YamlFormToggles.php
Processes a checkboxes form element.

File

src/Element/YamlFormToggle.php, line 27

Class

YamlFormToggle
Provides a form element for entering a toggle.

Namespace

Drupal\yamlform\Element

Code

public static function getDefaultProperties() {
  return [
    '#toggle_theme' => 'light',
    '#toggle_size' => 'medium',
    '#on_text' => '',
    '#off_text' => '',
  ];
}