You are here

function hook_field_group_pre_render_alter in Field Group 8.3

Same name and namespace in other branches
  1. 7.2 field_group.api.php \hook_field_group_pre_render_alter()
  2. 7 field_group.api.php \hook_field_group_pre_render_alter()

Alter the pre_rendered build of the field group element.

Parameters

array $element: Group being rendered.

object $group: The Field group info.

object $rendering_object: The entity / form being rendered.

File

./field_group.api.php, line 57
Hooks for the field_group module.

Code

function hook_field_group_pre_render_alter(array &$element, &$group, &$rendering_object) {
  if ($group->format_type == 'htab') {
    $element['#theme_wrappers'] = [
      'container' => [
        '#attributes' => [
          'class' => 'foobar',
        ],
      ],
    ];
  }
}