Posted by sun on January 11, 2013 at 1:45pm
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