You are here

public function Accordion::preRender in Field Group 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/field_group/FieldGroupFormatter/Accordion.php \Drupal\field_group\Plugin\field_group\FieldGroupFormatter\Accordion::preRender()

Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.

Parameters

array $element: The field group render array.

object $rendering_object: The object / entity beïng rendered.

Overrides FieldGroupFormatterBase::preRender

File

src/Plugin/field_group/FieldGroupFormatter/Accordion.php, line 52

Class

Accordion
Plugin implementation of the 'accordion' formatter.

Namespace

Drupal\field_group\Plugin\field_group\FieldGroupFormatter

Code

public function preRender(&$element, $rendering_object) {
  $this
    ->process($element, $rendering_object);
  $form_state = new FormState();
  AccordionElement::processAccordion($element, $form_state);
}