function _node_limit_next_limit_id in Node Limit 8
Same name and namespace in other branches
- 6 node_limit.module \_node_limit_next_limit_id()
- 7 node_limit.module \_node_limit_next_limit_id()
Helper function to get the next available node limit id.
2 calls to _node_limit_next_limit_id()
- node_limit_clone_limit in old/
node_limit.module - Callback to clone a limit.
- node_limit_limit_form_submit in old/
node_limit.module - Submission hook for node_limit_limit_form.
File
- old/
node_limit.module, line 605
Code
function _node_limit_next_limit_id() {
$select = \Drupal::database()
->select('node_limit', 'nl');
$select
->addExpression('MAX(lid)+1', 'lid');
$query = $select
->execute();
$next_lid = $query
->fetchField();
return max($next_lid, 1);
}