You are here

function tmgmt_smartling_update_8806 in TMGMT Translator Smartling 8.4

Set default force_block_for_tags string.

File

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

Code

function tmgmt_smartling_update_8806() {
  $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.force_block_for_tags', '')
        ->save(TRUE);
    }
  }
}