Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Freedom For Fieldsets! Long Live The DETAILS removed the ability to use the '#group' property on fieldsets and limit it only on #type 'details'. This patch restores that option and also makes it possible to use it on #type 'container'.

Module developers wanting to use the '#group' property on custom elements can simply use [className, 'processGroup' and [className, 'preRenderGroup'] in the #process and #pre_render key to add grouping support for the element.

  // In a class extending \Drupal\Core\Render\Element\RenderElement...
  public function getInfo() {
    $class = get_class($this);
    return [
      '#process' => [
        [$class, 'processGroup'],
      ],
      '#pre_render' => [
        [$class, 'preRenderGroup'],
      ],
    ];
  }
Impacts: 
Module developers