public function LingotekConfigTranslationService::updateConfig in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
- 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::updateConfig()
Resends a document to the translation service.
Parameters
$mapper_id: The entity being updated.
Return value
boolean TRUE if the document was updated successfully, FALSE if not.
Overrides LingotekConfigTranslationServiceInterface::updateConfig
1 call to LingotekConfigTranslationService::updateConfig()
- LingotekConfigTranslationService::uploadConfig in src/
LingotekConfigTranslationService.php - Uploads a document to the Lingotek service.
File
- src/
LingotekConfigTranslationService.php, line 966 - Contains \Drupal\lingotek\LingotekConfigTranslationService.
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
public function updateConfig($mapper_id) {
$mapper = $this->mappers[$mapper_id];
$source_data = json_encode($this
->getConfigSourceData($mapper));
$document_id = $this
->getConfigDocumentId($mapper);
$document_name = $mapper_id . ' (config): ' . $mapper
->getTitle();
if ($this->lingotek
->updateDocument($document_id, $source_data, NULL, $document_name)) {
$this
->setConfigSourceStatus($mapper, Lingotek::STATUS_IMPORTING);
$this
->setConfigTargetStatuses($mapper, Lingotek::STATUS_PENDING);
return $document_id;
}
return FALSE;
}