2 * Implements hook_entity_insert().
4 function {{ machine_name }}_entity_insert(Drupal\Core\Entity\EntityInterface $entity) {
5 // Insert the new entity into a fictional table of all entities.
6 db_insert('example_entity')
8 'type' => $entity->getEntityTypeId(),
10 'created' => REQUEST_TIME,
11 'updated' => REQUEST_TIME,