protected function ConditionalFieldEditForm::setFieldProperty in Conditional Fields 4.x
Same name and namespace in other branches
- 8 src/Form/ConditionalFieldEditForm.php \Drupal\conditional_fields\Form\ConditionalFieldEditForm::setFieldProperty()
Set render array property and all child elements.
1 call to ConditionalFieldEditForm::setFieldProperty()
- ConditionalFieldEditForm::getDummyField in src/
Form/ ConditionalFieldEditForm.php - Creates dummy field instance.
File
- src/
Form/ ConditionalFieldEditForm.php, line 613
Class
- ConditionalFieldEditForm
- An edit form for conditional fields.
Namespace
Drupal\conditional_fields\FormCode
protected function setFieldProperty(&$field, $property, $value) {
$elements = Element::children($field);
if (isset($elements) && count($elements) > 0) {
foreach ($elements as $element) {
$field[$element][$property] = $value;
$this
->setFieldProperty($field[$element], $property, $value);
}
}
}