summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-05-14 12:51:22 -0400
committerDries Buytaert <dries@buytaert.net>2011-05-14 12:51:22 -0400
commit37e529ab6d08c715a7614a942546b7e271667fa8 (patch)
treec5974856a53713ac29372c39d4c92ecddce70484
parent40f516cf3da0cece3865e5a8d1827375a67c3ac9 (diff)
downloadbrdo-37e529ab6d08c715a7614a942546b7e271667fa8.tar.gz
brdo-37e529ab6d08c715a7614a942546b7e271667fa8.tar.bz2
- Patch #988030 by mr.baileys, linclark: document correct sequence of hooks in node deletion.
-rw-r--r--modules/node/node.api.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/node/node.api.php b/modules/node/node.api.php
index 906dda1fd..3e8029cfc 100644
--- a/modules/node/node.api.php
+++ b/modules/node/node.api.php
@@ -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.