Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConfigurableLanguageManager.php

function ConfigurableLanguageManager::reset

Overrides LanguageManager::reset

File

core/modules/language/src/ConfigurableLanguageManager.php, line 241

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function reset($type = NULL) {
    if (!isset($type)) {
        $this->initialized = FALSE;
        $this->negotiatedLanguages = [];
        $this->negotiatedMethods = [];
        $this->languageTypes = NULL;
        $this->languageTypesInfo = NULL;
        $this->languages = [];
        if ($this->negotiator) {
            $this->negotiator
                ->reset();
        }
    }
    elseif (isset($this->negotiatedLanguages[$type])) {
        unset($this->negotiatedLanguages[$type]);
        unset($this->negotiatedMethods[$type]);
    }
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal