summaryrefslogtreecommitdiff
path: root/includes/common.inc
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 /includes/common.inc
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 'includes/common.inc')
-rw-r--r--includes/common.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 20b0648c7..d04f938ea 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -6575,6 +6575,19 @@ function entity_path($entity_type, $entity) {
return $info['path callback']($entity);
}
}
+/**
+ * Invokes entity insert/update hooks.
+ *
+ * @param $op
+ * One of 'insert' or 'update'.
+ * @param $entity_type
+ * The entity type; e.g. 'node' or 'user'.
+ * @param $entity
+ * The entity object being operated on.
+ */
+function entity_invoke($op, $entity_type, $entity) {
+ module_invoke_all('entity_' . $op, $entity, $entity_type);
+}
/**
* Performs one or more XML-RPC request(s).