You are here

public function ExtraFieldDisplayManagerInterface::entityView in Extra Field 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ExtraFieldDisplayManagerInterface.php \Drupal\extra_field\Plugin\ExtraFieldDisplayManagerInterface::entityView()

Appends the renderable data from ExtraField plugins to hook_entity_view().

Parameters

array &$build: A renderable array representing the entity content. The module may add elements to $build prior to rendering. The structure of $build is a renderable array as expected by drupal_render().

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity object.

\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The entity view display holding the display options configured for the entity components.

string $viewMode: The view mode the entity is rendered in.

1 method overrides ExtraFieldDisplayManagerInterface::entityView()
ExtraFieldDisplayManager::entityView in src/Plugin/ExtraFieldDisplayManager.php
Appends the renderable data from ExtraField plugins to hook_entity_view().

File

src/Plugin/ExtraFieldDisplayManagerInterface.php, line 39

Class

ExtraFieldDisplayManagerInterface
Provides the Extra field Display plugin manager.

Namespace

Drupal\extra_field\Plugin

Code

public function entityView(array &$build, ContentEntityInterface $entity, EntityViewDisplayInterface $display, $viewMode);