public static function LingotekSync::getSyncProjects in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getSyncProjects()
- 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getSyncProjects()
- 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getSyncProjects()
- 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getSyncProjects()
1 call to LingotekSync::getSyncProjects()
- 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 54 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getSyncProjects() {
$query = db_select('lingotek', 'l');
$query
->fields('l', array(
'lingovalue',
));
$query
->condition('lingokey', 'project_id');
$query
->distinct();
$result = $query
->execute();
$projects = $result
->fetchCol();
$default_project_id = variable_get('lingotek_project', NULL);
if (!is_null($default_project_id) && !in_array($default_project_id, $projects)) {
$projects[] = $default_project_id;
}
return $projects;
}