8.2.x Entity.php protected Entity::languageManager()
8.0.x Entity.php protected Entity::languageManager()
8.1.x Entity.php protected Entity::languageManager()
8.3.x Entity.php protected Entity::languageManager()

Gets the language manager.

Return value

\Drupal\Core\Language\LanguageManagerInterface

6 calls to Entity::languageManager()
ContentEntityBase::getLanguages in core/lib/Drupal/Core/Entity/ContentEntityBase.php
ContentEntityBase::isTranslatable in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Returns the translation support status.
ContentEntityBase::setDefaultLangcode in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Populates the local cache for the default language code.
Entity::language in core/lib/Drupal/Core/Entity/Entity.php
Gets the language of the entity.
User::getPreferredAdminLangcode in core/modules/user/src/Entity/User.php
Returns the preferred administrative language code of the account.

... See full list

File

core/lib/Drupal/Core/Entity/Entity.php, line 95

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

protected function languageManager() {
  return \Drupal::languageManager();
}