You are here

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

Same name and namespace in other branches
  1. 8.4 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 647

Class

TokenAuthUser
Class TokenAuthUser.

Namespace

Drupal\simple_oauth\Authentication

Code

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