diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index 7feed3488690472ab98e057b1a31fce332b36692..d5901ff23b1f167f54aaca4040f180620a9b3a3b 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -606,8 +606,8 @@ public static function linkGenerator() { * This method is a convenience wrapper for the link generator service's * generate() method. * - * @param string $text - * The link text for the anchor tag. + * @param string|array|\Drupal\Component\Render\MarkupInterface $text + * The link text for the anchor tag as a translated string or render array. * @param \Drupal\Core\Url $url * The URL object used for the link. * diff --git a/core/lib/Drupal/Core/Link.php b/core/lib/Drupal/Core/Link.php index c4fbd0dfc35823ffd85fa9ff9840a393fe3a9fec..90cbac9e9af99c98edaf57bece43a61b5e91cf96 100644 --- a/core/lib/Drupal/Core/Link.php +++ b/core/lib/Drupal/Core/Link.php @@ -66,8 +66,8 @@ public static function createFromRoute($text, $route_name, $route_parameters = [ /** * Creates a Link object from a given Url object. * - * @param string $text - * The text of the link. + * @param string|array|\Drupal\Component\Render\MarkupInterface $text + * The link text for the anchor tag as a translated string or render array. * @param \Drupal\Core\Url $url * The Url to create the link for. *