public function LingotekConfigTranslationService::setConfigDocumentId in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
- 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigDocumentId()
Sets the document id in the Lingotek platform for a given entity.
Parameters
\Drupal\config_translation\ConfigNamesMapper $mapper: The entity which we want to set the document id.
string $document_id: The document id.
Return value
string The document id in the Lingotek platform.
Overrides LingotekConfigTranslationServiceInterface::setConfigDocumentId
6 calls to LingotekConfigTranslationService::setConfigDocumentId()
- LingotekConfigTranslationService::addConfigTarget in src/
LingotekConfigTranslationService.php - Request a translation for a given entity in the given locale.
- LingotekConfigTranslationService::cancelConfigDocument in src/
LingotekConfigTranslationService.php - Cancels a document from the server.
- LingotekConfigTranslationService::requestConfigTranslations in src/
LingotekConfigTranslationService.php - Request all translations for a given mapper in all locales.
- LingotekConfigTranslationService::setConfigJobId in src/
LingotekConfigTranslationService.php - Sets the job ID of a given mapper.
- LingotekConfigTranslationService::updateConfig in src/
LingotekConfigTranslationService.php - Resends a document to the translation service.
File
- src/
LingotekConfigTranslationService.php, line 904
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
public function setConfigDocumentId(ConfigNamesMapper $mapper, $document_id) {
foreach ($mapper
->getConfigNames() as $config_name) {
$metadata = LingotekConfigMetadata::loadByConfigName($config_name);
$metadata
->setDocumentId($document_id);
$metadata
->save();
}
}