You are here

public function LingotekConfigTranslationService::getDocumentId in Lingotek Translation 8

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

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

Parameters

\Drupal\Core\Config\Entity\ConfigEntityInterface $entity: The entity which we want the document id.

Return value

string The document id in the Lingotek platform.

Overrides LingotekConfigTranslationServiceInterface::getDocumentId

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

... See full list

File

src/LingotekConfigTranslationService.php, line 176
Contains \Drupal\lingotek\LingotekConfigTranslationService.

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function getDocumentId(ConfigEntityInterface $entity) {
  $metadata = LingotekConfigMetadata::loadByConfigName($entity
    ->getEntityTypeId() . '.' . $entity
    ->id());
  return $metadata
    ->getDocumentId();
}