protected function YamlForm::collectSubElementKeysRecursive in YAML Form 8
Collect sub element keys from a render array.
Parameters
array $sub_element_keys: An array to be populated with sub element keys.
array $elements: A render array.
1 call to YamlForm::collectSubElementKeysRecursive()
- YamlForm::deleteElementRecursive in src/
Entity/ YamlForm.php - Remove an element by key from a render array.
File
- src/
Entity/ YamlForm.php, line 1050
Class
- YamlForm
- Defines the form entity.
Namespace
Drupal\yamlform\EntityCode
protected function collectSubElementKeysRecursive(array &$sub_element_keys, array $elements) {
foreach ($elements as $key => &$element) {
if (Element::property($key) || !is_array($element)) {
continue;
}
$sub_element_keys[$key] = $key;
$this
->collectSubElementKeysRecursive($sub_element_keys, $element);
}
}