You are here

public function ExampleAllNodes::view in Extra Field 8

Same name and namespace in other branches
  1. 8.2 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 26

Class

ExampleAllNodes
Example Extra field Display.

Namespace

Drupal\extra_field_example\Plugin\ExtraField\Display

Code

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