You are here

function tmgmt_smartling_update_8805 in TMGMT Translator Smartling 8.4

Set default exclude_translatable_attributes string.

File

./tmgmt_smartling.install, line 231
Update function for the tmgmt_smartling module.

Code

function tmgmt_smartling_update_8805() {
  $translator_ids = \Drupal::configFactory()
    ->listAll('tmgmt.translator');
  foreach ($translator_ids as $id) {
    $config = \Drupal::configFactory()
      ->getEditable($id);
    if ($config && $config
      ->get('plugin') === 'smartling') {
      $config
        ->set('settings.exclude_translatable_attributes', '')
        ->save(TRUE);
    }
  }
}