summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-30 02:01:41 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-30 02:01:41 +0000
commit02c1eeee3fc904ecc7845902cc11ba545dd9466b (patch)
treeeb0af2759c9e1d3ad8a83fef225df3e8ed28ba9c /modules/system
parentb1d0d1340c2f63ed5e1c8ec8df8b9e70edfe49ce (diff)
downloadbrdo-02c1eeee3fc904ecc7845902cc11ba545dd9466b.tar.gz
brdo-02c1eeee3fc904ecc7845902cc11ba545dd9466b.tar.bz2
#684202 by catch: Added Entity insert/delete/update hooks, to support caching.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.api.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 2563728f0..78cc24e2a 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -221,6 +221,32 @@ function hook_entity_load($entities, $type) {
}
/**
+ * Act on entities when inserted.
+ *
+ * Generic insert hook called for all entity types via entity_invoke().
+ *
+ * @param $entity
+ * The entity object.
+ * @param $type
+ * The type of entity being inserted (i.e. node, user, comment).
+ */
+function hook_entity_insert($entity, $type) {
+}
+
+/**
+ * Act on entities when updated.
+ *
+ * Generic update hook called for all entity types via entity_invoke().
+ *
+ * @param $entity
+ * The entity object.
+ * @param $type
+ * The type of entity being updated (i.e. node, user, comment).
+ */
+function hook_entity_update($entity, $type) {
+}
+
+/**
* Define administrative paths.
*
* Modules may specify whether or not the paths they define in hook_menu() are