You are here

function language_cookie_uninstall in Language Cookie 8

Implements hook_uninstall().

File

./language_cookie.install, line 32
The install and update code for the language_cookie module.

Code

function language_cookie_uninstall() {
  $language_types = \Drupal::languageManager()
    ->getLanguageTypes();
  $config = \Drupal::configFactory()
    ->getEditable('language.types');
  foreach ($language_types as $type) {
    $config
      ->clear('negotiation.' . $type . '.enabled.' . LanguageNegotiationCookie::METHOD_ID);
  }
  $config
    ->save();
}