2020-08-28 17:55:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* An example module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Drupal\Core\Entity\EntityInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_entity_view().
|
|
|
|
*/
|
|
|
|
function example_entity_view(array &$build, EntityInterface $entity): void {
|
2020-08-28 21:58:34 +00:00
|
|
|
Drupal::messenger()->addMessage('This is a node.');
|
2020-08-28 17:55:52 +00:00
|
|
|
}
|