public static function WebformElementHelper::setPropertyRecursive in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Utility/WebformElementHelper.php \Drupal\webform\Utility\WebformElementHelper::setPropertyRecursive()
Set a property on all elements and sub-elements.
Parameters
array $element: A render element.
string $property_key: The property key.
mixed $property_value: The property value.
6 calls to WebformElementHelper::setPropertyRecursive()
- WebformAttachmentTwig::form in modules/
webform_attachment/ src/ Plugin/ WebformElement/ WebformAttachmentTwig.php - Gets the actual configuration webform array to be built.
- WebformComputedTwig::form in src/
Plugin/ WebformElement/ WebformComputedTwig.php - Gets the actual configuration webform array to be built.
- WebformElementBase::form in src/
Plugin/ WebformElementBase.php - Gets the actual configuration webform array to be built.
- WebformEntityPrintAttachment::form in modules/
webform_entity_print_attachment/ src/ Plugin/ WebformElement/ WebformEntityPrintAttachment.php - Gets the actual configuration webform array to be built.
- WebformSubmissionForm::displayCurrentPage in src/
WebformSubmissionForm.php - Set webform wizard current page.
File
- src/
Utility/ WebformElementHelper.php, line 310
Class
- WebformElementHelper
- Helper class webform element methods.
Namespace
Drupal\webform\UtilityCode
public static function setPropertyRecursive(array &$element, $property_key, $property_value) {
$element[$property_key] = $property_value;
foreach (Element::children($element) as $key) {
self::setPropertyRecursive($element[$key], $property_key, $property_value);
}
}