public static function VerticalTabs::preRenderVerticalTabs in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Render/Element/VerticalTabs.php \Drupal\Core\Render\Element\VerticalTabs::preRenderVerticalTabs()
- 9 core/lib/Drupal/Core/Render/Element/VerticalTabs.php \Drupal\Core\Render\Element\VerticalTabs::preRenderVerticalTabs()
Prepares a vertical_tabs element for rendering.
Parameters
array $element: An associative array containing the properties and children of the vertical tabs element.
Return value
array The modified element.
File
- core/
lib/ Drupal/ Core/ Render/ Element/ VerticalTabs.php, line 79
Class
- VerticalTabs
- Provides a render element for vertical tabs in a form.
Namespace
Drupal\Core\Render\ElementCode
public static function preRenderVerticalTabs($element) {
// Do not render the vertical tabs element if it is empty.
$group = implode('][', $element['#parents']);
if (!Element::getVisibleChildren($element['group']['#groups'][$group])) {
$element['#printed'] = TRUE;
}
return $element;
}