From 02c1eeee3fc904ecc7845902cc11ba545dd9466b Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 30 Jan 2010 02:01:41 +0000 Subject: #684202 by catch: Added Entity insert/delete/update hooks, to support caching. --- includes/common.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'includes/common.inc') 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). -- cgit v1.2.3