Download & Extend

Container of #type vertical_tabs supports a #title now

Project: 
Drupal core
Introduced in branch: 
8.x
Description: 

The form/render element #type 'vertical_tabs' did not support a heading previously.

If a heading was needed, it had to be built and output separately from the vertical tabs container, potentially requiring additional access conditions in order to not output the heading when there are no visible/accessible tabs. Also making it harder for themers to control the styling of the entire vertical tabs container element.

In Drupal 8, #type vertical_tabs supports a #title now.

Drupal 7

<?php
     $form
['visibility_title'] = array(
      
'#type' => 'item',
      
'#title' => t('Visibility settings'),
      
'#weight' => 10,
     );
    
$form['visibility'] = array(
      
'#type' => 'vertical_tabs',
      
'#weight' => 15,
     );
?>

Drupal 8

<?php
     $form
['visibility'] = array(
      
'#type' => 'vertical_tabs',
      
'#title' => t('Visibility settings'),
      
'#weight' => 10,
     );
?>
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done
nobody click here