function webform_image_select_lingotek_config_entity_translation_presave in Webform 8.5
Implements hook_lingotek_config_entity_translation_presave().
File
- modules/
webform_image_select/ webform_image_select.module, line 91 - Provides a webform element for a selecting an image.
Code
function webform_image_select_lingotek_config_entity_translation_presave(ConfigEntityInterface &$translation, $langcode, &$data) {
switch ($translation
->getEntityTypeId()) {
case 'webform_image_select_images':
/** @var \Drupal\webform_image_select\WebformImageSelectImagesInterface $translation */
// Convert images associative array back to YAML string.
$translation
->setImages($data['images']);
$data['images'] = Yaml::encode($data['images']);
break;
}
}