public static function WebformElementHelper::removeProperties in Webform 8.5
Same name and namespace in other branches
- 6.x src/Utility/WebformElementHelper.php \Drupal\webform\Utility\WebformElementHelper::removeProperties()
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 WebformElementHelper::removeProperties()
- Webform::setElementPropertiesRecursive in src/
Entity/ Webform.php - Set element properties.
- WebformEntitySettingsFormForm::save in src/
EntitySettings/ WebformEntitySettingsFormForm.php - Form submission handler for the 'save' action.
File
- src/
Utility/ WebformElementHelper.php, line 291
Class
- WebformElementHelper
- Helper class webform element methods.
Namespace
Drupal\webform\UtilityCode
public static function removeProperties(array $element) {
foreach ($element as $key => $value) {
if (static::property($key)) {
unset($element[$key]);
}
}
return $element;
}