protected function ControllerBase::languageManager in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::languageManager()
- 9 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::languageManager()
Returns the language manager service.
Return value
\Drupal\Core\Language\LanguageManagerInterface The language manager.
1 call to ControllerBase::languageManager()
- ContentTranslationController::overview in core/
modules/ content_translation/ src/ Controller/ ContentTranslationController.php - Builds the translations overview page.
File
- core/
lib/ Drupal/ Core/ Controller/ ControllerBase.php, line 251
Class
- ControllerBase
- Utility base class for thin controllers.
Namespace
Drupal\Core\ControllerCode
protected function languageManager() {
if (!$this->languageManager) {
$this->languageManager = $this
->container()
->get('language_manager');
}
return $this->languageManager;
}