You are here

public function LingotekContentTranslationService::getDocumentId in Lingotek Translation 8

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

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

Parameters

\Drupal\Core\Entity\ContentEntityInterface &$entity: The entity which we want the document id.

Return value

string The document id in the Lingotek platform.

Overrides LingotekContentTranslationServiceInterface::getDocumentId

10 calls to LingotekContentTranslationService::getDocumentId()
LingotekContentTranslationService::addTarget in src/LingotekContentTranslationService.php
Request a translation for a given entity in the given locale.
LingotekContentTranslationService::checkSourceStatus in src/LingotekContentTranslationService.php
Checks the source is uploaded correctly.
LingotekContentTranslationService::checkTargetStatus in src/LingotekContentTranslationService.php
Gets the current status of the target translation.
LingotekContentTranslationService::checkTargetStatuses in src/LingotekContentTranslationService.php
Gets the current status of all the target translations.
LingotekContentTranslationService::deleteDocument in src/LingotekContentTranslationService.php
Deletes a document from the server and all related local data.

... See full list

File

src/LingotekContentTranslationService.php, line 325
Contains \Drupal\lingotek\LingotekContentTranslationService.

Class

LingotekContentTranslationService
Service for managing Lingotek content translations.

Namespace

Drupal\lingotek

Code

public function getDocumentId(ContentEntityInterface &$entity) {
  $doc_id = NULL;
  if ($entity->lingotek_document_id) {
    $doc_id = $entity->lingotek_document_id->value;
  }
  return $doc_id;
}