You are here

public static function LingotekConfigChunk::deleteSegmentTranslationsByChunkIdAndLanguage in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.3 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::deleteSegmentTranslationsByChunkIdAndLanguage()
  2. 7.5 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::deleteSegmentTranslationsByChunkIdAndLanguage()

Delete all target segments for a given chunk

Parameters

int: the ID of the chunk for which to delete target segments

string: the language code for which to delete target segments

1 call to LingotekConfigChunk::deleteSegmentTranslationsByChunkIdAndLanguage()
LingotekConfigChunk::updateLocalContentByTarget in lib/Drupal/lingotek/LingotekConfigChunk.php
Updates the local content of $target_code with data from a Lingotek Document

File

lib/Drupal/lingotek/LingotekConfigChunk.php, line 756
Defines LingotekConfigChunk.

Class

LingotekConfigChunk
A class wrapper for Lingotek-specific behavior on ConfigChunks.

Code

public static function deleteSegmentTranslationsByChunkIdAndLanguage($chunk_id, $target_language) {
  db_delete('locales_target')
    ->condition('language', $target_language)
    ->condition('lid', self::minLid($chunk_id), '>=')
    ->condition('lid', self::maxLid($chunk_id), '<=')
    ->condition('translation_agent_id', self::getLingotekTranslationAgentId())
    ->execute();
}