protected function ParagraphsTableFormatter::viewValue in Paragraphs table 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.
File
- src/
Plugin/ Field/ FieldFormatter/ ParagraphsTableFormatter.php, line 516
Class
- ParagraphsTableFormatter
- Plugin implementation of the 'paragraphs_table_formatter' formatter.
Namespace
Drupal\paragraphs_table\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));
}