You are here

public function WebformConfigProcessor::convertToTranslation in Translation Management Tool 8

Converts a translated data structure.

Parameters

array $data: The translated data structure.

Return value

array Returns a translation array as expected by \Drupal\config_translation\FormElement\ElementInterface::setConfig().

Overrides DefaultConfigProcessor::convertToTranslation

File

sources/tmgmt_config/src/WebformConfigProcessor.php, line 69

Class

WebformConfigProcessor

Namespace

Drupal\tmgmt_config

Code

public function convertToTranslation($data) {
  $translation = parent::convertToTranslation($data);
  if (isset($translation['elements'])) {
    $translation['elements'] = Yaml::encode($this
      ->convertTranslationToElements($translation['elements']));
  }
  return $translation;
}