You are here

public function TokenAuthUser::hasTranslation in Simple OAuth (OAuth2) & OpenID Connect 8.4

Same name and namespace in other branches
  1. 8 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::hasTranslation()
  2. 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::hasTranslation()
  3. 8.3 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::hasTranslation()
  4. 5.x src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::hasTranslation()

Checks there is a translation for the given language code.

Parameters

string $langcode: The language code identifying the translation.

Return value

bool TRUE if the translation exists, FALSE otherwise.

Overrides TranslatableInterface::hasTranslation

File

src/Authentication/TokenAuthUser.php, line 692

Class

TokenAuthUser
The decorated user class with token information.

Namespace

Drupal\simple_oauth\Authentication

Code

public function hasTranslation($langcode) {
  return $this->subject
    ->hasTranslation($langcode);
}