Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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?

Thanks.

share|improve this question

1 Answer 1

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 at 6:09

Your Answer

 
discard

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.