public static function LingotekSync::insertTargetEntriesForAllChunks in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.3 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::insertTargetEntriesForAllChunks()
- 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::insertTargetEntriesForAllChunks()
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 94 - 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();
foreach ($ids as $i) {
$chunk = LingotekConfigChunk::loadById($i);
if (is_object($chunk)) {
$chunk
->setTargetsStatus(self::STATUS_PENDING, $lingotek_locale);
}
}
}