You are here

function language_switcher_extended_update_8001 in Language Switcher Extended 8

Transform hide current language flag to a select field.

File

./language_switcher_extended.install, line 11
Install functions for the language_switcher_extended module.

Code

function language_switcher_extended_update_8001() {
  $config = \Drupal::configFactory()
    ->getEditable('language_switcher_extended.settings');
  $current_language_mode = $config
    ->get('hide_current_language') ? 'hide_link' : 'default';
  $config
    ->set('current_language_mode', $current_language_mode);
  $config
    ->clear('hide_current_language');
  $config
    ->save();
}