ExampleAllNodes.php in Extra Field 8
File
modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleAllNodes.php
View source
<?php
namespace Drupal\extra_field_example\Plugin\ExtraField\Display;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\extra_field\Plugin\ExtraFieldDisplayBase;
class ExampleAllNodes extends ExtraFieldDisplayBase {
public function view(ContentEntityInterface $entity) {
$elements = [
'#markup' => 'This is output from ExampleAllNodes',
];
return $elements;
}
}