You are here

public function LingotekConfigTranslationService::getConfigSourceData in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  2. 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  3. 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  4. 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  5. 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  6. 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  7. 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  8. 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  9. 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  10. 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()
  11. 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::getConfigSourceData()

Returns the source data that will be uploaded to the Lingotek service.

Only those fields that have actual translatable text, and have marked for upload will be included.

Parameters

\Drupal\config_translation\ConfigNamesMapper $mapper: The entity which we want the source data.

Return value

mixed

Overrides LingotekConfigTranslationServiceInterface::getConfigSourceData

3 calls to LingotekConfigTranslationService::getConfigSourceData()
LingotekConfigTranslationService::getSourceData in src/LingotekConfigTranslationService.php
LingotekConfigTranslationService::updateConfig in src/LingotekConfigTranslationService.php
Resends a document to the translation service.
LingotekConfigTranslationService::uploadConfig in src/LingotekConfigTranslationService.php
Uploads a document to the Lingotek service.

File

src/LingotekConfigTranslationService.php, line 1034

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function getConfigSourceData(ConfigNamesMapper $mapper) {
  $properties = $this
    ->getConfigTranslatableProperties($mapper);
  $values = [];
  foreach ($properties as $config_name => $config_properties) {
    $config = \Drupal::configFactory()
      ->getEditable($config_name);
    foreach ($config_properties as $property) {
      $values[$config_name][$property] = $config
        ->get($property);
    }
  }
  return $values;
}