summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-06-14 15:41:03 +0000
committerDries Buytaert <dries@buytaert.net>2010-06-14 15:41:03 +0000
commit9cf21be9949ad70b4fb41eed0d4b8204afead2f8 (patch)
treec01d1e3cc750c26a541f81a293ea9bcbd64d73a8 /modules/system
parentf6d56f96c306a9e9ec3202c087321edc39d65b03 (diff)
downloadbrdo-9cf21be9949ad70b4fb41eed0d4b8204afead2f8.tar.gz
brdo-9cf21be9949ad70b4fb41eed0d4b8204afead2f8.tar.bz2
- Patch #780154 by chx, noahb, dhthwy, pwolanin, aspilicious, jhodgdon, dereine, bjaspan: listing API for field API.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.api.php19
1 files changed, 19 insertions, 0 deletions
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
@@ -285,6 +285,25 @@ 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.
*
* Modules may specify whether or not the paths they define in hook_menu() are