You are here

public function PanelizerEntityViewBuilder::viewFieldItem in Panelizer 8.3

Same name and namespace in other branches
  1. 8.5 src/PanelizerEntityViewBuilder.php \Drupal\panelizer\PanelizerEntityViewBuilder::viewFieldItem()
  2. 8.4 src/PanelizerEntityViewBuilder.php \Drupal\panelizer\PanelizerEntityViewBuilder::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

src/PanelizerEntityViewBuilder.php, line 323

Class

PanelizerEntityViewBuilder
Entity view builder for entities that can be panelized.

Namespace

Drupal\panelizer

Code

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