summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2018-07-16 10:16:08 (GMT)
committerAlex Pott2018-07-16 10:16:15 (GMT)
commit9f4ca29c06fc9138243c25f238a6b34aee8b6059 (patch)
tree3b6217fecc644e6c9e5bd1ccdcc8e15c11500c37
parente1db334696ec4491b5fe58839bfd348e9591f32f (diff)
Issue #2972300 by msankhala, joachim: badly worded @return for getPreferredLangcode()
(cherry picked from commit bc8ba878e5b656ef82fb009cc746ef2a31ac2d85)
-rw-r--r--core/lib/Drupal/Core/Session/AccountInterface.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/lib/Drupal/Core/Session/AccountInterface.php b/core/lib/Drupal/Core/Session/AccountInterface.php
index ba3ed93..57f6f1d 100644
--- a/core/lib/Drupal/Core/Session/AccountInterface.php
+++ b/core/lib/Drupal/Core/Session/AccountInterface.php
@@ -76,10 +76,12 @@ interface AccountInterface {
* language if the user has no language preference.
*
* @return string
- * The language code that is preferred by the account. 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).
+ * Returned language code depends upon following:
+ * - The user preferred language code is returned if set in the account.
+ * - If the user has no preferred language and $fallback_to_default is TRUE
+ * then the site default language code is returned.
+ * - If the user has no preferred language and $fallback_to_default is FALSE
+ * then empty string is returned.
*/
public function getPreferredLangcode($fallback_to_default = TRUE);