public static function YamlFormElementHelper::removeProperties in YAML Form 8
Remove all properties from a render element.
Parameters
array $element: A render element.
Return value
array A render element with no properties.
2 calls to YamlFormElementHelper::removeProperties()
- YamlForm::setElementPropertiesRecursive in src/
Entity/ YamlForm.php - Set element properties.
- YamlFormEntitySettingsForm::save in src/
YamlFormEntitySettingsForm.php - Form submission handler for the 'save' action.
File
- src/
Utility/ YamlFormElementHelper.php, line 89
Class
- YamlFormElementHelper
- Helper class form element methods.
Namespace
Drupal\yamlform\UtilityCode
public static function removeProperties(array $element) {
foreach ($element as $key => $value) {
if (Element::property($key)) {
unset($element[$key]);
}
}
return $element;
}