You are here

protected static function LingotekConfigSet::getSetMeta in Lingotek Translation 7.6

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

Return any metadata for the given set ID, if it exists

Parameters

int $set_id:

Return value

array An array containing anything for the set_id from table lingotek_config_metadata

1 call to LingotekConfigSet::getSetMeta()
LingotekConfigSet::__construct in lib/Drupal/lingotek/LingotekConfigSet.php
Constructor.

File

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

Class

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

Code

protected static function getSetMeta($set_id) {
  $query = db_select('lingotek_config_metadata', 'l');
  $query
    ->fields('l', array(
    'id',
    'config_key',
    'value',
  ));
  $query
    ->condition('l.id', $set_id);
  $result = $query
    ->execute();
  $response = array();
  while ($record = $result
    ->fetch()) {
    $response[$record->config_key] = $record->value;
  }
  return $response;
}