From 9cf21be9949ad70b4fb41eed0d4b8204afead2f8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 14 Jun 2010 15:41:03 +0000 Subject: - Patch #780154 by chx, noahb, dhthwy, pwolanin, aspilicious, jhodgdon, dereine, bjaspan: listing API for field API. --- modules/system/system.api.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'modules/system/system.api.php') diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 32c55cf92..522866073 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -284,6 +284,25 @@ function hook_entity_insert($entity, $type) { function hook_entity_update($entity, $type) { } +/** + * Alter or execute an EntityFieldQuery. + * + * @param EntityFieldQuery $query + * An EntityFieldQuery. One of the most important properties to be changed is + * EntityFieldQuery::executeCallback. If this is set to an existing function, + * this function will get the query as its single argument and its result + * will be the returned as the result of EntityFieldQuery::execute(). This can + * be used to change the behavior of EntityFieldQuery entirely. For example, + * the default implementation can only deal with one field storage engine, but + * it is possible to write a module that can query across field storage + * engines. Also, the default implementation presumes entities are stored in + * SQL, but the execute callback could instead query any other entity storage, + * local or remote. + */ +function hook_entity_query_alter($query) { + $query->executeCallback = 'my_module_query_callback'; +} + /** * Define administrative paths. * -- cgit v1.2.3