public function FormatterInterface::viewElements in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FormatterInterface.php \Drupal\Core\Field\FormatterInterface::viewElements()
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.
1 call to FormatterInterface::viewElements()
- FormatterBase::view in core/
lib/ Drupal/ Core/ Field/ FormatterBase.php - Builds a renderable array for a fully themed field.
47 methods override FormatterInterface::viewElements()
- AggregatorTitleFormatter::viewElements in core/
modules/ aggregator/ src/ Plugin/ Field/ FieldFormatter/ AggregatorTitleFormatter.php - Builds a renderable array for a field value.
- AggregatorXSSFormatter::viewElements in core/
modules/ aggregator/ src/ Plugin/ Field/ FieldFormatter/ AggregatorXSSFormatter.php - Builds a renderable array for a field value.
- AuthorFormatter::viewElements in core/
modules/ user/ src/ Plugin/ Field/ FieldFormatter/ AuthorFormatter.php - Builds a renderable array for a field value.
- AuthorNameFormatter::viewElements in core/
modules/ comment/ src/ Plugin/ Field/ FieldFormatter/ AuthorNameFormatter.php - Builds a renderable array for a field value.
- BaseFieldFileFormatterBase::viewElements in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ BaseFieldFileFormatterBase.php - Builds a renderable array for a field value.
File
- core/
lib/ Drupal/ Core/ Field/ FormatterInterface.php, line 88
Class
- FormatterInterface
- Interface definition for field formatter plugins.
Namespace
Drupal\Core\FieldCode
public function viewElements(FieldItemListInterface $items, $langcode);