function hook_node_limit_sql in Node Limit 8
Same name and namespace in other branches
- 7 node_limit.api.php \hook_node_limit_sql()
Improve node limit count request.
Called when counting nodes to know if a limit has been reached.
Parameters
int $lid: The node limit id.
SelectQuery $select: The SQL select query.
5 functions implement hook_node_limit_sql()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- node_limit_interval_node_limit_sql in old/
node_limit_interval/ node_limit_interval.module - Implements hook_node_limit_sql().
- node_limit_role_node_limit_sql in old/
node_limit_role/ node_limit_role.module - Implements hook_node_limit_sql().
- node_limit_type_node_limit_sql in old/
node_limit_type/ node_limit_type.module - Implements hook_node_limit_sql().
- node_limit_userofrole_node_limit_sql in old/
node_limit_userofrole/ node_limit_userofrole.module - Implements hook_node_limit_sql().
- node_limit_user_node_limit_sql in old/
node_limit_user/ node_limit_user.module - Implements hook_node_limit_sql().
1 invocation of hook_node_limit_sql()
- _node_limit_sql in old/
node_limit.module - Generates the sql statement to find the nodes that apply to a particular limit.
File
- old/
node_limit.api.php, line 204 - Node_limit api reference.
Code
function hook_node_limit_sql($lid, SelectQuery $select) {
$limit = submodule_node_limit_load($lid);
if (empty($limit)) {
return;
}
$select
->condition('uid', $limit['submodule']['uid']);
}