public static function WebformBootstrapRenderCallbacks::webformLikertPreRender in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_bootstrap/src/WebformBootstrapRenderCallbacks.php \Drupal\webform_bootstrap\WebformBootstrapRenderCallbacks::webformLikertPreRender()
Render callback for the likerts element.
Parameters
array $element: The render array.
Return value
array The altered render array.
File
- modules/
webform_bootstrap/ src/ WebformBootstrapRenderCallbacks.php, line 22
Class
- WebformBootstrapRenderCallbacks
- Render callbacks for the webform bootstrap module.
Namespace
Drupal\webform_bootstrapCode
public static function webformLikertPreRender(array $element) {
foreach (Element::children($element) as $element_key) {
// Likerts allow description display to be configured, so disable
// smart description.
if (!empty($element[$element_key]['#description'])) {
$element[$element_key]['#smart_description'] = FALSE;
}
$element[$element_key] = static::webformLikertPreRender($element[$element_key]);
}
return $element;
}