You are here

public function WebformTranslationLingotekManager::configObjectDocumentUpload in Webform 6.x

Implements hook_lingotek_config_object_document_upload().

Parameters

array &$data: Data returned from the Lingotek service when asking for the translation.

string $config_name: The simple configuration name.

Overrides WebformTranslationLingotekManagerInterface::configObjectDocumentUpload

See also

hook_lingotek_config_object_document_upload().

File

src/WebformTranslationLingotekManager.php, line 157

Class

WebformTranslationLingotekManager
Defines a class to translate webform Lingotek integration.

Namespace

Drupal\webform

Code

public function configObjectDocumentUpload(array &$data, $config_name) {
  if ($config_name !== 'webform.settings') {
    return;
  }
  $data['webform.settings']['test.types'] = Yaml::decode($data['webform.settings']['test.types']);
  $data['webform.settings']['test.names'] = Yaml::decode($data['webform.settings']['test.names']);
  $this
    ->encodeTokens($data);
}