Commit 029d74f8 authored by catch's avatar catch

Issue #2443783 by gaurav_varshney, fotuzlab: Remove language_load(),...

Issue #2443783 by gaurav_varshney, fotuzlab: Remove language_load(), language_list() and language_default() from bootstrap.inc
parent 4e84e841
......@@ -868,58 +868,6 @@ function drupal_get_profile() {
return $profile;
}
/**
* Returns a list of languages set up on the site.
*
* @param $flags
* (optional) Specifies the state of the languages that have to be returned.
* It can be: LanguageInterface::STATE_CONFIGURABLE,
* LanguageInterface::STATE_LOCKED, or LanguageInterface::STATE_ALL.
*
* @return \Drupal\Core\Language\LanguageInterface[]
* An associative array of languages, keyed by the language code, ordered by
* weight ascending and name ascending.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::languageManager()->getLanguages().
*/
function language_list($flags = LanguageInterface::STATE_CONFIGURABLE) {
return \Drupal::languageManager()->getLanguages($flags);
}
/**
* Loads a language object from the database.
*
* @param string $langcode
* The language code.
*
* @return \Drupal\core\Language\LanguageInterface|null
* A fully-populated language object or NULL.
*
* @see \Drupal\Core\Language\LanguageManager::getLanguage()
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::languageManager()->getLanguage().
*/
function language_load($langcode) {
return \Drupal::languageManager()->getLanguage($langcode);
}
/**
* Returns the default language used on the site.
*
* @return \Drupal\Core\Language\LanguageInterface
* A language object.
*
* @see \Drupal\Core\Language\LanguageManager::getLanguage()
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::languageManager()->getDefaultLanguage().
*/
function language_default() {
return \Drupal::languageManager()->getDefaultLanguage();
}
/**
* Registers an additional namespace.
*
......
......@@ -446,10 +446,6 @@ public function testGetLangcode() {
catch (\RuntimeException $e) {}
}
// @todo Test ConfigNamesMapper::getLanguageWithFallback() once
// https://drupal.org/node/1862202 lands in core, because then we can
// remove the direct language_load() call.
/**
* Tests ConfigNamesMapper::getConfigData().
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment