public static function VerticalTabs::preRenderVerticalTabs in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 84 - Contains \Drupal\Core\Render\Element\VerticalTabs.
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;
}