You are here

protected static function LingotekConfigSet::getNextSetId in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.6 lib/Drupal/lingotek/LingotekConfigSet.php \LingotekConfigSet::getNextSetId()
1 call to LingotekConfigSet::getNextSetId()
LingotekConfigSet::createSet in lib/Drupal/lingotek/LingotekConfigSet.php

File

lib/Drupal/lingotek/LingotekConfigSet.php, line 319
Defines LingotekConfigSet.

Class

LingotekConfigSet
A class wrapper for Lingotek-specific behavior on ConfigSets.

Code

protected static function getNextSetId() {
  $query = db_query('SELECT max(id) FROM lingotek_config_metadata WHERE id < :max_size', array(
    ':max_size' => LingotekSync::MARKED_OFFSET,
  ));
  $max_set_id = $query
    ->fetchField();
  if ($max_set_id) {
    return (int) $max_set_id + 1;
  }
  return 1;
}