You are here

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

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

Gets the document id in the Lingotek platform for a given component.

Parameters

string $component: The component which we want the document id.

Return value

string The document id in the Lingotek platform.

Overrides LingotekInterfaceTranslationServiceInterface::getDocumentId

13 calls to LingotekInterfaceTranslationService::getDocumentId()
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::checkTargetStatus in src/LingotekInterfaceTranslationService.php
Gets the current status of the target translation.

... See full list

File

src/LingotekInterfaceTranslationService.php, line 406

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

public function getDocumentId($component) {
  $doc_id = NULL;
  $metadata = $this
    ->getMetadata($component);
  if (!empty($metadata) && isset($metadata['document_id'])) {
    $doc_id = $metadata['document_id'];
  }
  return $doc_id;
}