Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. function hook_entity_update($entity) {
  2. // Update the entity's entry in a fictional table of all entities.
  3. db_update('example_entity')
  4. ->fields(array('comment' => 1))
  5. ->condition('type', $entity->entityType())
  6. ->condition('id', $entity->id())
  7. ->execute();
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement