2 * Implements hook_entity_update().
4 function {{ machine_name }}_entity_update($entity, $type) {
5 // Update the entity's entry in a fictional table of all entities.
6 $info = entity_get_info($type);
7 list($id) = entity_extract_ids($type, $entity);
8 db_update('example_entity')
10 'updated' => REQUEST_TIME,
12 ->condition('type', $type)
13 ->condition('id', $id)