You are here

public function FieldGroupFormatterBase::preRender in Field Group 8.3

Same name and namespace in other branches
  1. 8 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

10 calls to FieldGroupFormatterBase::preRender()
Accordion::process in src/Plugin/field_group/FieldGroupFormatter/Accordion.php
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…
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.
AccordionItem::process in src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
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…
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.
FieldGroupFormatterBase::process in src/FieldGroupFormatterBase.php
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…

... 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 190

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;
  $element['#show_empty_fields'] = $this
    ->getSetting('show_empty_fields');
}