public function LingotekContentTranslationService::getJobId in Lingotek Translation 3.7.x
Same name and namespace in other branches
- 8.2 src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 4.0.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.0.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.1.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.2.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.3.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.4.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.5.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.6.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
- 3.8.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getJobId()
Gets the job ID of a given entity.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity we want to get the job id.
Return value
string Returns the job ID is saved.
Overrides LingotekContentTranslationServiceInterface::getJobId
3 calls to LingotekContentTranslationService::getJobId()
- LingotekContentTranslationService::setJobId in src/
LingotekContentTranslationService.php - Sets the job ID of a given entity.
- LingotekContentTranslationService::updateDocument in src/
LingotekContentTranslationService.php - Resends a document to the translation service.
- LingotekContentTranslationService::uploadDocument in src/
LingotekContentTranslationService.php - Uploads a document to the Lingotek service.
File
- src/
LingotekContentTranslationService.php, line 2257
Class
- LingotekContentTranslationService
- Service for managing Lingotek content translations.
Namespace
Drupal\lingotekCode
public function getJobId(ContentEntityInterface $entity) {
$job_id = NULL;
if (!empty($entity
->get('lingotek_metadata')->target_id)) {
/** @var \Drupal\lingotek\Entity\LingotekContentMetadata $metadata */
$metadata = $entity->lingotek_metadata->entity;
$job_id = $metadata
->getJobId();
}
return $job_id;
}