You are here

function hook_node_limit_sql in Node Limit 7

Same name and namespace in other branches
  1. 8 old/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 node_limit_interval/node_limit_interval.module
Implements hook_node_limit_sql().
node_limit_role_node_limit_sql in node_limit_role/node_limit_role.module
Implements hook_node_limit_sql().
node_limit_type_node_limit_sql in node_limit_type/node_limit_type.module
Implements hook_node_limit_sql().
node_limit_userofrole_node_limit_sql in node_limit_userofrole/node_limit_userofrole.module
Implements hook_node_limit_sql().
node_limit_user_node_limit_sql in node_limit_user/node_limit_user.module
Implements hook_node_limit_sql().
1 invocation of hook_node_limit_sql()
_node_limit_sql in ./node_limit.module
Generates the sql statement to find the nodes that apply to a particular limit. Modules that implement hook_node_limit_sql() should sprintf their arguments into the returned array. This will be changed in Drupal 7, which will be able to accept an…

File

./node_limit.api.php, line 198
Node_limit api reference.

Code

function hook_node_limit_sql($lid, $select) {
  $limit = submodule_node_limit_load($lid);
  if (empty($limit)) {
    return;
  }
  $select
    ->condition('uid', $limit['submodule']['uid']);
}