public function LingotekConfigTranslationService::saveConfigTargetData in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
- 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::saveConfigTargetData()
2 calls to LingotekConfigTranslationService::saveConfigTargetData()
- LingotekConfigTranslationService::downloadConfig in src/
LingotekConfigTranslationService.php - Downloads a document to the Lingotek service.
- LingotekConfigTranslationService::saveTargetData in src/
LingotekConfigTranslationService.php
File
- src/
LingotekConfigTranslationService.php, line 1581
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
public function saveConfigTargetData(ConfigNamesMapper $mapper, $langcode, $data) {
$names = $mapper
->getConfigNames();
if (!empty($names)) {
foreach ($names as $name) {
$config_translation = $this->languageManager
->getLanguageConfigOverride($langcode, $name);
foreach ($data as $name => $properties) {
foreach ($properties as $property => $value) {
$config_translation
->set($property, html_entity_decode($value));
}
$config_translation
->save();
}
}
}
}