2

I need to react to updates of custom entities wich are using Entity API (Redhen organization in my case).

I tried using hook_entity_update($entity, $type) but it does not seem to be fired when updating said entity.

Thank you for your time.

2
  • I would try to upgrade your "probably" to "definitely" before continuing...hook_entity_update() is called for all entities that use the entity API in my experience (all entities are equally 'custom' if you think about it, they all hook into the same system)...perhaps you're not dealing with an entity but something else?
    – Clive
    Mar 6 '14 at 18:10
  • I checked the code of the redhen org module and it uses entity API : class RedhenOrgEntityController extends EntityAPIControllerExportable so it's definitively an entity.
    – Morsok
    Mar 6 '14 at 18:13
0

If it can help other people :

hook_entity_update is working fine as long as it is declared in the .module file.

I putted it int an inc file so it was never fired !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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