2 * Implements hook_ENTITY_TYPE_update().
4 function {{ machine_name }}_ENTITY_TYPE_update(Drupal\Core\Entity\EntityInterface $entity) {
5 // Update the entity's entry in a fictional table of this type of entity.
6 db_update('example_entity')
8 'updated' => REQUEST_TIME,
10 ->condition('id', $entity->id())