public function FormatterInterface::view

Builds a renderable array for one field on one entity instance.

Parameters

Drupal\Core\Entity\EntityInterface $entity: The entity being displayed.

string $langcode: The language associated with $items.

array $items: Array of field values already loaded for the entities, keyed by entity id.

Return value

array A renderable array for a themed field with its label and all its values.

1 method overrides FormatterInterface::view()
FormatterBase::view in drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterBase.php
Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::view().

File

drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterInterface.php, line 90
Definition of Drupal\field\Plugin\Type\Formatter\FormatterInterface.

Class

FormatterInterface
Interface definition for field widget plugins.

Namespace

Drupal\field\Plugin\Type\Formatter

Code

public function view(EntityInterface $entity, $langcode, array $items);