protected static function WebformMultiple::hasRequireElement in Webform 8.5
Same name and namespace in other branches
- 6.x src/Element/WebformMultiple.php \Drupal\webform\Element\WebformMultiple::hasRequireElement()
Determine if any sub-element is required.
Parameters
array $element: An element.
Return value
bool TRUE if any sub-element is required.
1 call to WebformMultiple::hasRequireElement()
- WebformMultiple::processWebformMultiple in src/
Element/ WebformMultiple.php - Process items and build multiple elements widget.
File
- src/
Element/ WebformMultiple.php, line 1117
Class
- WebformMultiple
- Provides a webform element to assist in creation of multiple elements.
Namespace
Drupal\webform\ElementCode
protected static function hasRequireElement(array $element) {
$required_properties = [
'#required' => TRUE,
'#_required' => TRUE,
];
return WebformElementHelper::hasProperties($element, $required_properties);
}