Problem/Motivation
On #2201399: [meta] Various hooks removed in Drupal 8 with no change notices, it was noted that some entity hooks that were listed on the D7 Hooks topic are missing from D8. These hooks actually exist and are being invoked, but they're not documented. They are of the form hook_$entitytype_$operation -- for example, hook_node_insert(), hook_image_style_delete(), etc.
The specific hooks identified that are missing from 8 that were in 7 are:
hook_actions_delete
hook_filter_format_insert
hook_image_style_delete
hook_image_style_save
There are probably additional hooks as well that exist but that are undocumented. And we could/should probably use the same methodology for document node and taxonomy hooks.
Proposed resolution
a) Figure out a uniform way to document these hooks. Proposal, something like this:
/**
* Respond to image style deletion.
*
* This is actually a special case of hook_ENTITY_TYPE_delete().
*/
function hook_image_style_delete() {}
b) Add documentation as needed. Besides adding docs like the above to an api.php file, we would also need to make sure that hook_ENTITY_TYPE_delete() documentation exists as well. Currently there is only documentation for hook_ENTITY_TYPE_access().
Remaining tasks
1. Decide on the documentation method.
2. Fix the documentation.
User interface changes
None.
API changes
None.
Comments
Comment #1
catchComment #2
jhodgdonThis is being taken care of on #2216535: Replace Node overview topic and Node API topic with Entity Hooks topic