public function TokenAuthUser::getTranslation in Simple OAuth (OAuth2) & OpenID Connect 8.3
Same name and namespace in other branches
- 8.4 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getTranslation()
- 8 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getTranslation()
- 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getTranslation()
- 5.x src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getTranslation()
Gets a translation of the data.
The returned translation has to be of the same type than this typed data object.
Parameters
$langcode: The language code of the translation to get or LanguageInterface::LANGCODE_DEFAULT to get the data in default language.
Return value
$this A typed data object for the translated data.
Throws
\InvalidArgumentException If an invalid or non-existing translation language is specified.
Overrides TranslatableInterface::getTranslation
File
- src/
Authentication/ TokenAuthUser.php, line 678
Class
- TokenAuthUser
- The decorated user class with token information.
Namespace
Drupal\simple_oauth\AuthenticationCode
public function getTranslation($langcode) {
return $this->subject
->getTranslation($langcode);
}