public function LingotekInterfaceTranslationService::getDocumentId in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getDocumentId()
- 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getDocumentId()
- 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getDocumentId()
- 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getDocumentId()
- 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getDocumentId()
- 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getDocumentId()
- 3.7.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.
File
- src/
LingotekInterfaceTranslationService.php, line 406
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
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;
}