You are here

public function ExtraFieldDisplayFormattedInterface::viewElements in Extra Field 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ExtraFieldDisplayFormattedInterface.php \Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedInterface::viewElements()

Returns the renderable array of the field item(s).

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The field's host entity.

Return value

array A renderable array of field elements. If this contains children, the field output will be rendered as a multiple value field with each child as a field item.

1 call to ExtraFieldDisplayFormattedInterface::viewElements()
ExtraFieldDisplayFormattedBase::view in src/Plugin/ExtraFieldDisplayFormattedBase.php
Builds a renderable array for the field.
6 methods override ExtraFieldDisplayFormattedInterface::viewElements()
EmptyFormattedFieldTest::viewElements in tests/extra_field_test/src/Plugin/ExtraField/Display/EmptyFormattedFieldTest.php
Returns the renderable array of the field item(s).
ExampleFormattedField::viewElements in modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleFormattedField.php
Returns the renderable array of the field item(s).
ExampleMultilingualField::viewElements in modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleMultilingualField.php
Returns the renderable array of the field item(s).
MultipleItemsFieldTest::viewElements in tests/extra_field_test/src/Plugin/ExtraField/Display/MultipleItemsFieldTest.php
Returns the renderable array of the field item(s).
MultipleItemsFieldWithCacheDependencyTest::viewElements in tests/extra_field_test/src/Plugin/ExtraField/Display/MultipleItemsFieldWithCacheDependencyTest.php
Returns the renderable array of the field item(s).

... See full list

File

src/Plugin/ExtraFieldDisplayFormattedInterface.php, line 23

Class

ExtraFieldDisplayFormattedInterface
Defines an interface for Extra Field Display plugins.

Namespace

Drupal\extra_field\Plugin

Code

public function viewElements(ContentEntityInterface $entity);