public static function LingotekSync::resetNodeInfoByDocId in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.3 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::resetNodeInfoByDocId()
1 call to LingotekSync::resetNodeInfoByDocId()
- LingotekApi::removeDocument in lib/
Drupal/ lingotek/ LingotekApi.php
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 762 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function resetNodeInfoByDocId($lingotek_document_id) {
$doc_ids = is_array($lingotek_document_id) ? $lingotek_document_id : array(
$lingotek_document_id,
);
$count = 0;
foreach ($doc_ids as $doc_id) {
$node_id = LingotekSync::getNodeIdFromDocId($doc_id);
// grab before node info is removed
LingotekSync::removeNodeInfoByDocId($doc_id);
//remove locally (regardless of success remotely)
if ($node_id !== FALSE) {
LingotekSync::setNodeStatus($node_id, LingotekSync::STATUS_EDITED);
$count++;
}
}
return $count;
}