public function LanguageManager::reset

Resets the given language type or all types if none specified.

Parameters

string|null $type: (optional) The language type to reset as a string, e.g., Language::TYPE_INTERFACE, or NULL to reset all language types. Defaults to NULL.

1 call to LanguageManager::reset()
LanguageManager::setRequest in drupal/core/lib/Drupal/Core/Language/LanguageManager.php
Sets the $request property and resets all language types.

File

drupal/core/lib/Drupal/Core/Language/LanguageManager.php, line 121
Contains \Drupal\Core\Language\LanguageManager.

Class

LanguageManager
Class responsible for initializing each language type.

Namespace

Drupal\Core\Language

Code

public function reset($type = NULL) {
  if (!isset($type)) {
    $this->languages = array();
    $this->initialized = FALSE;
  }
  elseif (isset($this->languages[$type])) {
    unset($this->languages[$type]);
  }
}