You are here

public function DetailsSidebar::process in Field Group 8.3

Allows the field group formatter to manipulate the field group array and attach the formatters elements. The process method is called in the #process part of theme layer, and is currently used for forms. The preRender method is called in the #pre_render part of the theme layer, and is currently used for entity displays.

Parameters

array $element: The field group render array.

object $processed_object: The object / entity beïng processed.

Overrides Details::process

File

src/Plugin/field_group/FieldGroupFormatter/DetailsSidebar.php, line 23

Class

DetailsSidebar
Details Sidebar element.

Namespace

Drupal\field_group\Plugin\field_group\FieldGroupFormatter

Code

public function process(&$element, $processed_object) {
  parent::process($element, $processed_object);
  $element['#group'] = 'advanced';
  if ($this
    ->getSetting('weight')) {
    $element['#weight'] = $this
      ->getSetting('weight');
  }
}