diff core/modules/user/src/Entity/User.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children af1871eacc83
line wrap: on
line diff
--- a/core/modules/user/src/Entity/User.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/user/src/Entity/User.php	Thu Feb 28 13:21:36 2019 +0000
@@ -22,6 +22,13 @@
  * @ContentEntityType(
  *   id = "user",
  *   label = @Translation("User"),
+ *   label_collection = @Translation("Users"),
+ *   label_singular = @Translation("user"),
+ *   label_plural = @Translation("users"),
+ *   label_count = @PluralTranslation(
+ *     singular = "@count user",
+ *     plural = "@count users",
+ *   ),
  *   handlers = {
  *     "storage" = "Drupal\user\UserStorage",
  *     "storage_schema" = "Drupal\user\UserStorageSchema",
@@ -348,6 +355,7 @@
   public function isAuthenticated() {
     return $this->id() > 0;
   }
+
   /**
    * {@inheritdoc}
    */
@@ -420,7 +428,7 @@
         'name' => [LanguageInterface::LANGCODE_DEFAULT => ''],
         // Explicitly set the langcode to ensure that field definitions do not
         // need to be fetched to figure out a default.
-        'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED]
+        'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED],
       ], $entity_type->id());
     }
     return clone static::$anonymousUser;