diff --git a/core/lib/Drupal/Core/TypedData/DataDefinition.php b/core/lib/Drupal/Core/TypedData/DataDefinition.php index 8ac57a164100e47470d8d8152fbcbca808cf1048..9653d09670a18d72668002ec30ee4fdf235e9267 100644 --- a/core/lib/Drupal/Core/TypedData/DataDefinition.php +++ b/core/lib/Drupal/Core/TypedData/DataDefinition.php @@ -78,7 +78,7 @@ public function getLabel() { /** * Sets the human-readable label. * - * @param string $label + * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label * The label to set. * * @return static @@ -99,7 +99,7 @@ public function getDescription() { /** * Sets the human-readable description. * - * @param string $description + * @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description * The description to set. * * @return static diff --git a/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php b/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php index a709b7a5c5239cc2ce8cfa499bddd4926d1d665d..e5614d3d462e85e092f7fad8a2f43654463b4a6f 100644 --- a/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php +++ b/core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php @@ -57,9 +57,10 @@ public function getDataType(); /** * Returns a human readable label. * - * @return string|\Drupal\Core\StringTranslation\TranslatableMarkup + * @return string|\Drupal\Core\StringTranslation\TranslatableMarkup|null * The label. A string or an instance of TranslatableMarkup will be returned - * based on the way the label translation is handled. + * based on the way the label translation is handled. NULL if no label is + * available. */ public function getLabel(); @@ -69,8 +70,10 @@ public function getLabel(); * Descriptions are usually used on user interfaces where the data is edited * or displayed. * - * @return string|null - * The description, or NULL if no description is available. + * @return string|\Drupal\Core\StringTranslation\TranslatableMarkup|null + * The description. A string or an instance of TranslatableMarkup will be + * returned based on the way the description translation is handled. NULL if + * no description is available. */ public function getDescription();