public static function LingotekSync::insertTargetEntriesForAllEntities in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::insertTargetEntriesForAllEntities()
- 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::insertTargetEntriesForAllEntities()
1 call to LingotekSync::insertTargetEntriesForAllEntities()
- 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 108 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function insertTargetEntriesForAllEntities($lingotek_locale) {
// insert/update a target language for all entities
$query = db_select('{lingotek_entity_metadata}', 'meta')
->fields('meta', array(
'entity_id',
'entity_type',
))
->condition('meta.entity_key', 'document_id');
$entities = $query
->execute()
->fetchAll();
foreach ($entities as $e) {
self::setTargetStatus($e->entity_type, $e->entity_id, $lingotek_locale, self::STATUS_PENDING);
}
}