diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 2fd5984..4e63ef0 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -183,6 +183,8 @@ class EntityType implements EntityTypeInterface { * The human-readable name of the type. * * @var string + * + * @see \Drupal\Core\Entity\EntityTypeInterface::getLabel() */ protected $label = ''; @@ -190,6 +192,8 @@ class EntityType implements EntityTypeInterface { * The indefinite singular name of the type. * * @var string + * + * @see \Drupal\Core\Entity\EntityTypeInterface::getSingularLabel() */ protected $label_singular = ''; @@ -197,6 +201,8 @@ class EntityType implements EntityTypeInterface { * The indefinite plural name of the type. * * @var string + * + * @see \Drupal\Core\Entity\EntityTypeInterface::getPluralLabel() */ protected $label_plural = ''; @@ -206,6 +212,8 @@ class EntityType implements EntityTypeInterface { * Needed keys: "singular" and "plural". * * @var string[] + * + * @see \Drupal\Core\Entity\EntityTypeInterface::getCountLabel() */ protected $label_count = []; diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index f2d693a..b68de47 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -617,6 +617,9 @@ public function getDataTable(); /** * Gets the human-readable name of the entity type. * + * This method should be used when you want to refer to the abstract concept + * of a specific entity type. + * * @return string * The human-readable name of the entity type. */ @@ -627,12 +630,16 @@ public function getLabel(); * * @return string * The lowercase form of the human-readable entity type name. + * + * @see ::getLabel(). */ public function getLowercaseLabel(); /** * Gets the singular label of the entity type. * + * This method should be used when you refer to exactly one entity. + * * @return string * The singular label. */ @@ -641,13 +648,19 @@ public function getSingularLabel(); /** * Gets the plural label of the entity type. * + * This label should be used for example in places where you want to refer to + * a list of entities. + * * @return string * The plural label. */ public function getPluralLabel(); /** - * Gets the count label of the entity type + * Gets the count label of the entity type. + * + * This label should be used when you know the amount of entities you want to + * show. For example a header summary of a entity list would be a great place. * * @param int $count * The item count to display if the plural form was requested.