protected function DropdownFieldFormatter::viewValue in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 8 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 8.2 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 8.3 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 8.4 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 8.6 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 8.7 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 8.8 modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 10.3.x modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 10.0.x modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 10.1.x modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
- 10.2.x modules/custom/dropdown/src/Plugin/Field/FieldFormatter/DropdownFieldFormatter.php \Drupal\dropdown\Plugin\Field\FieldFormatter\DropdownFieldFormatter::viewValue()
Generate the output appropriate for one field item.
Parameters
\Drupal\Core\Field\FieldItemInterface $item: One field item.
Return value
string The textual output generated.
1 call to DropdownFieldFormatter::viewValue()
- DropdownFieldFormatter::viewElements in modules/
custom/ dropdown/ src/ Plugin/ Field/ FieldFormatter/ DropdownFieldFormatter.php - Builds a renderable array for a field value.
File
- modules/
custom/ dropdown/ src/ Plugin/ Field/ FieldFormatter/ DropdownFieldFormatter.php, line 44
Class
- DropdownFieldFormatter
- Plugin implementation of the 'dropdown_field_formatter' formatter.
Namespace
Drupal\dropdown\Plugin\Field\FieldFormatterCode
protected function viewValue(FieldItemInterface $item) {
// The text value has no text format assigned to it, so the user input
// should equal the output, including newlines.
return $this
->getLabelForValue($item->value);
}