You are here

public function EntityViewBuilderDecorator::viewFieldItem in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Entity/EntityViewBuilderDecorator.php \Drupal\webprofiler\Entity\EntityViewBuilderDecorator::viewFieldItem()
  2. 8.2 webprofiler/src/Entity/EntityViewBuilderDecorator.php \Drupal\webprofiler\Entity\EntityViewBuilderDecorator::viewFieldItem()
  3. 4.x webprofiler/src/Entity/EntityViewBuilderDecorator.php \Drupal\webprofiler\Entity\EntityViewBuilderDecorator::viewFieldItem()

Builds a renderable array for a single field item.

Parameters

\Drupal\Core\Field\FieldItemInterface $item: FieldItem to be displayed.

string|array $display_options: Can be either the name of a view mode, or an array of display settings. See EntityViewBuilderInterface::viewField() for more information.

Return value

array A renderable array for the field item.

Overrides EntityViewBuilderInterface::viewFieldItem

See also

\Drupal\Core\Entity\EntityViewBuilderInterface::viewField()

File

webprofiler/src/Entity/EntityViewBuilderDecorator.php, line 71

Class

EntityViewBuilderDecorator
Class EntityViewBuilderDecorator

Namespace

Drupal\webprofiler\Entity

Code

public function viewFieldItem(FieldItemInterface $item, $display_options = []) {
  return $this
    ->getOriginalObject()
    ->viewFieldItem($item, $display_options);
}