public function ExampleArticle::view in Extra Field 8.2
Same name and namespace in other branches
- 8 modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleArticle.php \Drupal\extra_field_example\Plugin\ExtraField\Display\ExampleArticle::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/ ExampleArticle.php, line 25
Class
- ExampleArticle
- Example Extra field Display.
Namespace
Drupal\extra_field_example\Plugin\ExtraField\DisplayCode
public function view(ContentEntityInterface $entity) {
return [
'#markup' => 'This is output from ExampleArticle',
];
}