Act on entities when updated.
Drupal\Core\Entity\EntityInterface $entity: The entity object.
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_entity_update(Drupal\Core\Entity\EntityInterface $entity) {
// Update the entity's entry in a fictional table of all entities.
db_update('example_entity')
->fields(array(
'updated' => REQUEST_TIME,
))
->condition('type', $entity
->entityType())
->condition('id', $entity
->id())
->execute();
}