Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know how to use hooks like hook_node_presave. Is there also a hook to catch the deletion of a relation or the update of a relation? In the API I cannot find anything. Maybe there is a workaround?


share|improve this question
up vote 3 down vote accepted

Relations are themselves entities, so you can use the entity hooks:

and so on, checking the $type parameter to react only for the appropriate entity type(s).

There's a full list of available entity hooks in the system.api.php file.

share|improve this answer
Thank you very much, that sounds great! – schulle877 Jul 11 '14 at 6:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.