Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
01a33182
Commit
01a33182
authored
Apr 20, 2009
by
Dries
Browse files
- Patch
#299176
by chx, Crell: added example of hook_query_alter to API documentation.
parent
ff9b6c61
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/system/system.api.php
View file @
01a33182
...
...
@@ -1451,14 +1451,17 @@ function hook_schema_alter(&$schema) {
*
* @see hook_query_TAG_alter()
* @see node_query_node_access_alter()
*
* @see QueryAlterableInterface
* @see SelectQueryInterface
* @param $query
* A Query object describing the composite parts of a SQL query.
* @return
* None.
*/
function
hook_query_alter
(
QueryAlterableInterface
$query
)
{
if
(
$query
->
hasTag
(
'micro_limit'
))
{
$query
->
range
(
0
,
2
);
}
}
/**
...
...
@@ -1466,6 +1469,8 @@ function hook_query_alter(QueryAlterableInterface $query) {
*
* @see hook_query_alter()
* @see node_query_node_access_alter()
* @see QueryAlterableInterface
* @see SelectQueryInterface
*
* @param $query
* An Query object describing the composite parts of a SQL query.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment