- Patch #988030 by mr.baileys, linclark: document correct sequence of hooks in node deletion.
parent
40f516cf3d
commit
37e529ab6d
|
@ -37,6 +37,7 @@
|
|||
* - Creating a new node (calling node_save() on a new node):
|
||||
* - field_attach_presave()
|
||||
* - hook_node_presave() (all)
|
||||
* - hook_entity_presave() (all)
|
||||
* - Node and revision records are written to the database
|
||||
* - hook_insert() (node-type-specific)
|
||||
* - field_attach_insert()
|
||||
|
@ -47,6 +48,7 @@
|
|||
* - Updating an existing node (calling node_save() on an existing node):
|
||||
* - field_attach_presave()
|
||||
* - hook_node_presave() (all)
|
||||
* - hook_entity_presave() (all)
|
||||
* - Node and revision records are written to the database
|
||||
* - hook_update() (node-type-specific)
|
||||
* - field_attach_update()
|
||||
|
@ -69,6 +71,9 @@
|
|||
* - hook_entity_prepare_view() (all)
|
||||
* - field_attach_view()
|
||||
* - hook_node_view() (all)
|
||||
* - hook_entity_view() (all)
|
||||
* - hook_node_view_alter() (all)
|
||||
* - hook_entity_view_alter() (all)
|
||||
* - Viewing multiple nodes (calling node_view_multiple() - note that the input
|
||||
* to node_view_multiple() is a set of loaded nodes, so the Loading steps
|
||||
* above are already done):
|
||||
|
@ -77,13 +82,16 @@
|
|||
* - hook_view() (node-type-specific)
|
||||
* - field_attach_view()
|
||||
* - hook_node_view() (all)
|
||||
* - hook_entity_view() (all)
|
||||
* - hook_node_view_alter() (all)
|
||||
* - hook_entity_view_alter() (all)
|
||||
* - Deleting a node (calling node_delete() or node_delete_multiple()):
|
||||
* - Node is loaded (see Loading section above)
|
||||
* - Node and revision information is deleted from database
|
||||
* - hook_delete() (node-type-specific)
|
||||
* - hook_node_delete() (all)
|
||||
* - hook_entity_delete() (all)
|
||||
* - field_attach_delete()
|
||||
* - Node and revision information are deleted from database
|
||||
* - Deleting a node revision (calling node_revision_delete()):
|
||||
* - Node is loaded (see Loading section above)
|
||||
* - Revision information is deleted from database
|
||||
|
@ -453,9 +461,10 @@ function hook_node_operations() {
|
|||
/**
|
||||
* Respond to node deletion.
|
||||
*
|
||||
* This hook is invoked from node_delete_multiple() after the node has been
|
||||
* removed from the node table in the database, after the type-specific
|
||||
* hook_delete() has been invoked, and before field_attach_delete() is called.
|
||||
* This hook is invoked from node_delete_multiple() after the type-specific
|
||||
* hook_delete() has been invoked, but before hook_entity_delete and
|
||||
* field_attach_delete() are called, and before the node is removed from the
|
||||
* node table in the database.
|
||||
*
|
||||
* @param $node
|
||||
* The node that is being deleted.
|
||||
|
|
Loading…
Reference in New Issue