function lightning_core_element_info_alter in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 lightning_core.module \lightning_core_element_info_alter()
- 8 lightning_core.module \lightning_core_element_info_alter()
- 8.2 lightning_core.module \lightning_core_element_info_alter()
- 8.3 lightning_core.module \lightning_core_element_info_alter()
Implements hook_element_info_alter().
File
- ./
lightning_core.module, line 105 - Contains core functionality for the Lightning distribution.
Code
function lightning_core_element_info_alter(array &$info) {
// Add support for the #legend property to checkboxes and radios.
// @see Element::processLegend()
$info['radios']['#legend'] = $info['checkboxes']['#legend'] = [];
$info['radios']['#process'][] = $info['checkboxes']['#process'][] = [
ElementHelper::class,
'processLegend',
];
}