2 * Implements hook_entity_update().
4 function {{ machine_name }}_entity_update(Drupal\Core\Entity\EntityInterface $entity) {
5 // Update the entity's entry in a fictional table of all entities.
6 \Drupal::database()->update('example_entity')
8 'updated' => REQUEST_TIME,
10 ->condition('type', $entity->getEntityTypeId())
11 ->condition('id', $entity->id())