public static function LingotekSync::insertTargetEntriesForAllChunks in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::insertTargetEntriesForAllChunks()
- 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::insertTargetEntriesForAllChunks()
1 call to LingotekSync::insertTargetEntriesForAllChunks()
- LingotekSync::insertTargetEntriesForAllDocs in lib/
Drupal/ lingotek/ LingotekSync.php
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 106 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function insertTargetEntriesForAllChunks($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();
$drupal_language_code = Lingotek::convertLingotek2Drupal($lingotek_locale);
foreach ($ids as $i) {
$chunk = LingotekConfigChunk::loadById($i);
$chunk
->setChunkTargetsStatus(self::STATUS_PENDING, $drupal_language_code);
}
}