You are here

public function ExampleAllNodes::view in Extra Field 8.2

Same name and namespace in other branches
  1. 8 modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleAllNodes.php \Drupal\extra_field_example\Plugin\ExtraField\Display\ExampleAllNodes::view()

Builds a renderable array for the field.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The field's host entity.

Return value

array Renderable array.

Overrides ExtraFieldDisplayInterface::view

File

modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleAllNodes.php, line 27

Class

ExampleAllNodes
Example Extra field Display.

Namespace

Drupal\extra_field_example\Plugin\ExtraField\Display

Code

public function view(ContentEntityInterface $entity) {
  return [
    '#markup' => 'This is output from ExampleAllNodes',
  ];
}