public static function LingotekSync::getSyncProjects in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getSyncProjects()
- 7.3 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()
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 86 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getSyncProjects() {
$query = db_select('lingotek_entity_metadata', 'l');
$query
->fields('l', array(
'value',
));
$query
->condition('entity_type', 'node');
$query
->condition('entity_key', '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;
}