summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2014-04-16 16:11:12 -0700
committerJennifer Hodgdon <yahgrp@poplarware.com>2014-04-16 16:11:12 -0700
commit27304fc152198e86100619d367009a64b175f4cb (patch)
tree0dd0bba12ff2a23760eaab237b8e2d9582f008fa /modules/node/node.module
parentd2481b8ce8b59d6024f1c9deb464d04ca29f54ad (diff)
downloadbrdo-27304fc152198e86100619d367009a64b175f4cb.tar.gz
brdo-27304fc152198e86100619d367009a64b175f4cb.tar.bz2
Issue #1885420 by cs_shadow, kim.pepper, xjm: Fix docs for metadata on node access queries
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index c6574abc0..5a4e01947 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -3290,6 +3290,17 @@ function node_query_entity_field_access_alter(QueryAlterableInterface $query) {
/**
* Helper for node access functions.
*
+ * Queries tagged with 'node_access' that are not against the {node} table
+ * should add the base table as metadata. For example:
+ * @code
+ * $query
+ * ->addTag('node_access')
+ * ->addMetaData('base_table', 'taxonomy_index');
+ * @endcode
+ * If the query is not against the {node} table, an attempt is made to guess
+ * the table, but is not recommended to rely on this as it is deprecated and not
+ * allowed in Drupal 8. It is always safer to provide the table.
+ *
* @param $query
* The query to add conditions to.
* @param $type