public static function LingotekConfigChunk::getTargetStatusById in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.3 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::getTargetStatusById()
- 7.4 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::getTargetStatusById()
Return the status of the target locale for the given chunk_id
Parameters
int $chunk_id: The id of the chunk to search for
string $target_locale: The lingotek locale to search for
Return value
string The status of the target locale for the given chunk_id
1 call to LingotekConfigChunk::getTargetStatusById()
- LingotekSync::getTargetStatus in lib/
Drupal/ lingotek/ LingotekSync.php
File
- lib/
Drupal/ lingotek/ LingotekConfigChunk.php, line 94 - Defines LingotekConfigChunk.
Class
- LingotekConfigChunk
- A class wrapper for Lingotek-specific behavior on ConfigChunks.
Code
public static function getTargetStatusById($chunk_id, $target_locale) {
$result = db_select('{lingotek_config_metadata}', 'meta')
->fields('meta', array(
'value',
))
->condition('id', $chunk_id)
->condition('config_key', 'target_sync_status_' . $target_locale)
->execute();
if ($result && ($value = $result
->fetchField())) {
return $value;
}
LingotekLog::error('Did not find a target status for chunk ID "@id"', array(
'@id' => $chunk_id,
));
return FALSE;
}