You are here

public static function LingotekSync::removeNodeInfoByDocId in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.3 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::removeNodeInfoByDocId()
2 calls to LingotekSync::removeNodeInfoByDocId()
LingotekApi::removeDocument in lib/Drupal/lingotek/LingotekApi.php
LingotekSync::resetNodeInfoByDocId in lib/Drupal/lingotek/LingotekSync.php

File

lib/Drupal/lingotek/LingotekSync.php, line 783
LingotekSync

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function removeNodeInfoByDocId($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) {
    $nid = self::getNodeIdFromDocId($doc_id);
    if ($nid) {
      self::removeNodeInfoByNodeId($nid);
      $count++;
    }
  }
  return $count;
}