You are here

function administration_language_negotiation_uninstall in Administration Language Negotiation 8

Same name and namespace in other branches
  1. 7 administration_language_negotiation.install \administration_language_negotiation_uninstall()

Implements hook_uninstall().

File

./administration_language_negotiation.install, line 15

Code

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