You are here

protected function OwlFieldFormatter::viewValue in Multipurpose Corporate Profile 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

modules/contrib/owl/src/Plugin/Field/FieldFormatter/OwlFieldFormatter.php, line 370
Contains \Drupal\owl\Plugin\Field\FieldFormatter\OwlFieldFormatter.

Class

OwlFieldFormatter
Plugin implementation of the 'owl_field_formatter' formatter.

Namespace

Drupal\owl\Plugin\Field\FieldFormatter

Code

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));
}