protected function FontawesomeIconpicker::viewValue in Font Awesome Iconpicker 8
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 FontawesomeIconpicker::viewValue()
- FontawesomeIconpicker::viewElements in src/
Plugin/ Field/ FieldFormatter/ FontawesomeIconpicker.php - Builds a renderable array for a field value.
File
- src/
Plugin/ Field/ FieldFormatter/ FontawesomeIconpicker.php, line 93
Class
- FontawesomeIconpicker
- Plugin implementation of the 'fontawesome_iconpicker' formatter.
Namespace
Drupal\fontawesome_iconpicker\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 nl2br(Html::escape($item->value));
}