This question is about Drupal 7. For a particular node type, let's take three examples:
- a) book
- b) article
- c) customcontenttype
I would like to be able to capture the moment of an update of an existing node of this type.
I would like to know if there is a way to target only that node type directly from the hook and not to have the hook triggered for all nodes and then checking the node type.
I've seen some internet articles talking about
mymodule_node_update - for me this is a general hook for all nodes
mymodule_book_update or mymodule_article_update or mymodule_customcontentype_update
- mymodule_form_book_node_form_alter or mymodule_form_article_node_form_alter or mymodule_form_customcontenttype_node_form_alter
Which one of the three above hooks should I use? all of them? if none of them are good then which hook to use?