You are here

public function FieldGroupFormatterBase::preRender in Field Group 8

Same name and namespace in other branches
  1. 8.3 src/FieldGroupFormatterBase.php \Drupal\field_group\FieldGroupFormatterBase::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 FieldGroupFormatterInterface::preRender

6 calls to FieldGroupFormatterBase::preRender()
Accordion::preRender in src/Plugin/field_group/FieldGroupFormatter/Accordion.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
AccordionItem::preRender in src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
Details::preRender in src/Plugin/field_group/FieldGroupFormatter/Details.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
HtmlElement::preRender in src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
Tab::preRender in src/Plugin/field_group/FieldGroupFormatter/Tab.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.

... See full list

7 methods override FieldGroupFormatterBase::preRender()
Accordion::preRender in src/Plugin/field_group/FieldGroupFormatter/Accordion.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
AccordionItem::preRender in src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
Details::preRender in src/Plugin/field_group/FieldGroupFormatter/Details.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
Fieldset::preRender in src/Plugin/field_group/FieldGroupFormatter/Fieldset.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.
HtmlElement::preRender in src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php
Allows the field group formatter to manipulate the field group array and attach the formatters rendering element.

... See full list

File

src/FieldGroupFormatterBase.php, line 173

Class

FieldGroupFormatterBase
Base class for 'Fieldgroup formatter' plugin implementations.

Namespace

Drupal\field_group

Code

public function preRender(&$element, $rendering_object) {
  $element['#group_name'] = $this->group->group_name;
  $element['#entity_type'] = $this->group->entity_type;
  $element['#bundle'] = $this->group->bundle;
}