public function TokenAuthUser::getPreferredAdminLangcode in Simple OAuth (OAuth2) & OpenID Connect 8
Same name and namespace in other branches
- 8.4 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getPreferredAdminLangcode()
- 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getPreferredAdminLangcode()
- 8.3 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getPreferredAdminLangcode()
- 5.x src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getPreferredAdminLangcode()
Returns the preferred administrative language code of the account.
Defines which language is used on administrative pages.
Parameters
bool $fallback_to_default: (optional) Whether the return value will fall back to the site default language if the user has no administration language preference.
Return value
string The language code that is preferred by the account for administration pages. If the preferred language is not set or is a language not configured anymore on the site, the site default is returned or an empty string is returned (if $fallback_to_default is FALSE).
Overrides AccountInterface::getPreferredAdminLangcode
File
- src/
Authentication/ TokenAuthUser.php, line 101
Class
- TokenAuthUser
- Class TokenAuthUser.
Namespace
Drupal\simple_oauth\AuthenticationCode
public function getPreferredAdminLangcode($fallback_to_default = TRUE) {
return $this->subject
->getPreferredAdminLangcode($fallback_to_default);
}