protected static function WebformMultiple::setElementRowDefaultValueRecursive in Webform 8.5
Same name and namespace in other branches
- 6.x src/Element/WebformMultiple.php \Drupal\webform\Element\WebformMultiple::setElementRowDefaultValueRecursive()
Set element row default value recursively.
Parameters
array $element: The element.
array $default_value: The default values.
1 call to WebformMultiple::setElementRowDefaultValueRecursive()
- WebformMultiple::buildElementRow in src/
Element/ WebformMultiple.php - Build a single element row.
File
- src/
Element/ WebformMultiple.php, line 733
Class
- WebformMultiple
- Provides a webform element to assist in creation of multiple elements.
Namespace
Drupal\webform\ElementCode
protected static function setElementRowDefaultValueRecursive(array &$element, array $default_value) {
foreach (Element::children($element) as $child_key) {
if (isset($default_value[$child_key])) {
static::setElementDefaultValue($element[$child_key], $default_value[$child_key]);
}
static::setElementRowDefaultValueRecursive($element[$child_key], $default_value);
}
}