You are here

protected static function LingotekConfigSet::createSet in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.6 lib/Drupal/lingotek/LingotekConfigSet.php \LingotekConfigSet::createSet()
2 calls to LingotekConfigSet::createSet()
LingotekConfigSet::assignSetId in lib/Drupal/lingotek/LingotekConfigSet.php
LingotekConfigSet::bulkGetSetId in lib/Drupal/lingotek/LingotekConfigSet.php

File

lib/Drupal/lingotek/LingotekConfigSet.php, line 303
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;
}