From dbc74bbb9c25a76e77f573aee63c724ff81a7a2e Mon Sep 17 00:00:00 2001 From: xjm <xjm@65776.no-reply.drupal.org> Date: Sat, 2 May 2020 18:48:24 -0500 Subject: [PATCH] Issue #3063694 by dhirendra.mishra, devoidfury, joachim: class docs for Url should give an overview of how to create one --- core/lib/Drupal/Core/Url.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/lib/Drupal/Core/Url.php b/core/lib/Drupal/Core/Url.php index ea552bf4cb9f..82c2c600b376 100644 --- a/core/lib/Drupal/Core/Url.php +++ b/core/lib/Drupal/Core/Url.php @@ -15,6 +15,14 @@ /** * Defines an object that holds information about a URL. + * + * In most cases, these should be created with the following methods: + * - \Drupal\Core\Url::fromRoute() + * - \Drupal\Core\Url::fromRouteMatch() + * - \Drupal\Core\Url::fromUri() + * - \Drupal\Core\Url::fromUserInput() + * + * @see \Drupal\Core\Entity\EntityBase::toUrl() */ class Url implements TrustedCallbackInterface { use DependencySerializationTrait; -- GitLab