public static function LingotekSync::setNodeAndTargetsStatus in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::setNodeAndTargetsStatus()
3 calls to LingotekSync::setNodeAndTargetsStatus()
- LingotekApi::addContentDocument in lib/
Drupal/ lingotek/ LingotekApi.php - Add a document to the Lingotek platform.
- LingotekApi::updateContentDocument in lib/
Drupal/ lingotek/ LingotekApi.php - Updates the content of an existing Lingotek document with the current object contents.
- lingotek_upload_document in ./
lingotek.module
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 68 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function setNodeAndTargetsStatus($node, $node_status, $targets_status) {
// Set the Node to EDITED.
self::setNodeStatus($node->nid, $node_status);
$source_lingotek_locale = Lingotek::convertDrupal2Lingotek($node->language, FALSE);
// Loop though each target language, and set that target to EDITED.
$languages = Lingotek::availableLanguageTargets('lingotek_locale', FALSE, $source_lingotek_locale);
foreach ($languages as $lingotek_locale) {
self::setTargetStatus($node->nid, $lingotek_locale, $targets_status);
}
}