public function YamlFormTableTrait::setDefaultValue in YAML Form 8
File
- src/
Plugin/ YamlFormElement/ YamlFormTableTrait.php, line 50
Class
- YamlFormTableTrait
- Provides a 'table' trait.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function setDefaultValue(array &$element) {
if (isset($element['#default_value']) && is_array($element['#default_value'])) {
$element['#default_value'] = array_combine($element['#default_value'], $element['#default_value']);
}
}