You are here

public static function LingotekSync::insertTargetEntriesForAllSets in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::insertTargetEntriesForAllSets()
1 call to LingotekSync::insertTargetEntriesForAllSets()
lingotek_set_target_language in ./lingotek.util.inc
Sets the extended target language locale in the languages table and whether or not it is enabled

File

lib/Drupal/lingotek/LingotekSync.php, line 101
LingotekSync

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function insertTargetEntriesForAllSets($lingotek_locale) {

  // insert/update a target language for all chunks
  $query = db_select('lingotek_config_metadata', 'meta')
    ->fields('meta', array(
    'id',
  ))
    ->groupBy('id');
  $ids = $query
    ->execute()
    ->fetchCol();
  foreach ($ids as $i) {
    $set = LingotekConfigSet::loadById($i);
    if (is_object($set)) {
      $set
        ->setTargetsStatus(self::STATUS_PENDING, $lingotek_locale);
    }
  }
}