function Details::preRenderDetails
Same name in this branch
- 11.x core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::preRenderDetails()
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::preRenderDetails()
- 8.9.x core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::preRenderDetails()
- 10 core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::preRenderDetails()
Adds form element theming to details.
Parameters
array $element: An associative array containing the properties and children of the details.
Return value
array The modified element.
File
-
core/
modules/ system/ tests/ modules/ element_info_test/ src/ Render/ Element/ Details.php, line 51
Class
- Details
- Provides a render element for a details element.
Namespace
Drupal\element_info_test\Render\ElementCode
public static function preRenderDetails($element) : array {
Element::setAttributes($element, [
'custom',
]);
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.