8.3.x Drupal.php Drupal::languageManager()
8.0.x Drupal.php public static Drupal::languageManager()
8.1.x Drupal.php public static Drupal::languageManager()
8.2.x Drupal.php public static Drupal::languageManager()
8.4.x Drupal.php public static Drupal::languageManager()

Returns the language manager service.

Return value

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

161 calls to Drupal::languageManager()
AccountForm::form in core/modules/user/src/AccountForm.php
Gets the actual form array to be built.
AdminPathEntityConverterLanguageTest::testConfigUsingCurrentLanguage in core/modules/language/src/Tests/AdminPathEntityConverterLanguageTest.php
Tests the translated and untranslated config entities are loaded properly.
BlockContentTypeTest::testBlockContentTypeCreation in core/modules/block_content/src/Tests/BlockContentTypeTest.php
Tests creating a block type programmatically and via a form.
BlockStorageUnitTest::createTests in core/modules/block/tests/src/Kernel/BlockStorageUnitTest.php
Tests the creation of blocks.
block_update_8001 in core/modules/block/block.install
Update block visibility context mapping.

... See full list

File

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

Class

Drupal
Static Service Container wrapper.

Code

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