You are here

function LingotekImportForm::searchForDoc in Lingotek Translation 8

1 call to LingotekImportForm::searchForDoc()
LingotekImportForm::import in src/Form/LingotekImportForm.php
This function is to import a document from the TMS.

File

src/Form/LingotekImportForm.php, line 295
Contains \Drupal\Lingotek\Form\LingotekManagementForm.

Class

LingotekImportForm
@file Contains \Drupal\Lingotek\Form\LingotekManagementForm.

Namespace

Drupal\lingotek\Form

Code

function searchForDoc($id) {
  $doc_id = null;
  foreach ($this->table_docs as $table_doc) {
    if ($table_doc['id'] == $id) {
      $doc_id = $table_doc['doc_id'];
      break;
    }
  }
  foreach ($this->docs as $docObject) {
    if ($docObject->properties->id == $doc_id) {
      return $docObject;
    }
  }
  return null;
}