function NumericUnformattedFormatter::viewElements
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericUnformattedFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericUnformattedFormatter::viewElements()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericUnformattedFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericUnformattedFormatter::viewElements()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericUnformattedFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericUnformattedFormatter::viewElements()
Overrides FormatterInterface::viewElements
1 call to NumericUnformattedFormatter::viewElements()
- AttachmentTestFormatter::viewElements in core/
modules/ views/ tests/ modules/ views_test_formatter/ src/ Plugin/ Field/ FieldFormatter/ AttachmentTestFormatter.php - Builds a renderable array for a field value.
1 method overrides NumericUnformattedFormatter::viewElements()
- AttachmentTestFormatter::viewElements in core/
modules/ views/ tests/ modules/ views_test_formatter/ src/ Plugin/ Field/ FieldFormatter/ AttachmentTestFormatter.php - Builds a renderable array for a field value.
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldFormatter/ NumericUnformattedFormatter.php, line 27
Class
- NumericUnformattedFormatter
- Plugin implementation of the 'number_unformatted' formatter.
Namespace
Drupal\Core\Field\Plugin\Field\FieldFormatterCode
public function viewElements(FieldItemListInterface $items, $langcode) {
$elements = [];
foreach ($items as $delta => $item) {
$elements[$delta] = [
'#markup' => $item->value,
];
}
return $elements;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.