You are here

public function LingotekInterfaceTranslationService::setDocumentId in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setDocumentId()
  2. 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setDocumentId()
  3. 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setDocumentId()
  4. 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setDocumentId()
  5. 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setDocumentId()
  6. 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setDocumentId()
  7. 3.8.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setDocumentId()

Sets the Lingotek document id for a given component.

Parameters

string $component: The component which we want to set a document id.

$doc_id: The document id in the Lingotek platform.

Return value

string The component.

Overrides LingotekInterfaceTranslationServiceInterface::setDocumentId

10 calls to LingotekInterfaceTranslationService::setDocumentId()
LingotekInterfaceTranslationService::addTarget in src/LingotekInterfaceTranslationService.php
Request a translation for a given component in the given locale.
LingotekInterfaceTranslationService::cancelDocument in src/LingotekInterfaceTranslationService.php
Cancels a document from the server.
LingotekInterfaceTranslationService::cancelDocumentTarget in src/LingotekInterfaceTranslationService.php
Cancels a translation for a given component in the given locale.
LingotekInterfaceTranslationService::checkSourceStatus in src/LingotekInterfaceTranslationService.php
Checks the source is uploaded correctly.
LingotekInterfaceTranslationService::downloadDocument in src/LingotekInterfaceTranslationService.php
Downloads a document from the Lingotek service for a given locale.

... See full list

File

src/LingotekInterfaceTranslationService.php, line 418

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

public function setDocumentId($component, $doc_id) {
  $metadata = $this
    ->getMetadata($component);
  $metadata['document_id'] = $doc_id;
  $this
    ->saveMetadata($component, $metadata);
  return $component;
}