You are here

language_switcher_extended.install in Language Switcher Extended 8

Install functions for the language_switcher_extended module.

File

language_switcher_extended.install
View source
<?php

/**
 * @file
 * Install functions for the language_switcher_extended module.
 */

/**
 * Transform hide current language flag to a select field.
 */
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();
}

Functions

Namesort descending Description
language_switcher_extended_update_8001 Transform hide current language flag to a select field.