You are here

public static function Drupal::languageManager in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal.php \Drupal::languageManager()

Returns the language manager service.

Return value

\Drupal\Core\Language\LanguageManagerInterface The language manager.

14 calls to Drupal::languageManager()
ConfigurableLanguage::postDelete in core/modules/language/src/Entity/ConfigurableLanguage.php
Acts on deleted entities before the delete hook is invoked.
ConfigurableLanguage::postSave in core/modules/language/src/Entity/ConfigurableLanguage.php
Acts on a saved entity before the insert or update hook is invoked.
DrupalTest::testLanguageManager in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the languageManager() method.
EntityBase::languageManager in core/lib/Drupal/Core/Entity/EntityBase.php
Gets the language manager.
InstallerTranslationMultipleLanguageTest::testTranslationsLoaded in core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php
Tests that translations ended up at the expected places.

... See full list

File

core/lib/Drupal.php, line 646
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function languageManager() {
  return static::getContainer()
    ->get('language_manager');
}