You are here

public function LingotekInterface::uploadDocument in Lingotek Translation 3.3.x

Same name and namespace in other branches
  1. 8 src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  2. 8.2 src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  3. 4.0.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  4. 3.0.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  5. 3.1.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  6. 3.2.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  7. 3.4.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  8. 3.5.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  9. 3.6.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  10. 3.7.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()
  11. 3.8.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface::uploadDocument()

Uploads a document to the Lingotek service.

Parameters

string $title: The title of the document as it will be seen in the TMS.

string|array $content: The content of the document. It can be a json string or an array that will be json encoded.

string $locale: The Lingotek locale.

string $url: (optional) The document url in the site if any. This allows support for in-context review.

\Drupal\lingotek\LingotekProfileInterface $profile: (optional) The profile being used.

string $job_id: (optional) The job ID that will be associated.

Return value

string The document ID assigned to the uploaded document.

Throws

\Drupal\lingotek\Exception\LingotekPaymentRequiredException

\Drupal\lingotek\Exception\LingotekApiException

2 methods override LingotekInterface::uploadDocument()
Lingotek::uploadDocument in src/Lingotek.php
Uploads a document to the Lingotek service.
LingotekFake::uploadDocument in tests/modules/lingotek_test/src/LingotekFake.php
Uploads a document to the Lingotek service.

File

src/LingotekInterface.php, line 224

Class

LingotekInterface

Namespace

Drupal\lingotek

Code

public function uploadDocument($title, $content, $locale, $url = NULL, LingotekProfileInterface $profile = NULL, $job_id = NULL);