public FormatterInterface::viewElements(FieldItemListInterface $items, $langcode)
Builds a renderable array for a field value.
\Drupal\Core\Field\FieldItemListInterface $items: The field values to be rendered.
string $langcode: The language that should be used to render the field.
array A renderable array for $items, as an array of child elements keyed by consecutive numeric indexes starting from 0.
public function viewElements(FieldItemListInterface $items, $langcode);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!FormatterInterface.php/function/FormatterInterface::viewElements/8.1.x