You are here

protected static function LingotekConfigSet::createSet in Lingotek Translation 7.6

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

File

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

Class

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

Code

protected static function createSet($textgroup) {
  $timestamp = time();
  $next_id = self::getNextSetId();
  db_insert('lingotek_config_metadata')
    ->fields(array(
    'id' => $next_id,
    'config_key' => 'textgroup',
    'value' => $textgroup,
    'created' => $timestamp,
    'modified' => $timestamp,
  ))
    ->execute();
  return $next_id;
}