FormatterInterface::viewElements

public FormatterInterface::viewElements(FieldItemListInterface $items, $langcode)

Builds a renderable array for a field value.

Parameters

\Drupal\Core\Field\FieldItemListInterface $items: The field values to be rendered.

string $langcode: The language that should be used to render the field.

Return value

array A renderable array for $items, as an array of child elements keyed by consecutive numeric indexes starting from 0.

File

core/lib/Drupal/Core/Field/FormatterInterface.php, line 88

Class

FormatterInterface
Interface definition for field formatter plugins.

Namespace

Drupal\Core\Field

Code

public function viewElements(FieldItemListInterface $items, $langcode);
doc_Drupal
2016-10-29 09:15:14
Comments
Leave a Comment

Please login to continue.