diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 7a86e68..3fdd049 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -149,7 +149,14 @@ public function label($langcode = NULL) { } /** - * {@inheritdoc}. + * Returns the URI elements of the entity. + * + * @param string $rel + * The link relationship type. + * + * @return + * An array containing the 'path' and 'options' keys used to build the URI + * of the entity, and matching the signature of url(). */ public function uri($rel = 'canonical') { $entity_info = $this->entityInfo(); @@ -172,12 +179,12 @@ public function uri($rel = 'canonical') { return $uri; } - // For a canonical link (that is, a link to self), use the default logic. + // Only use these defaults for a canonical link (that is, a link to self). // Other relationship types are not supported by this logic. if ($rel == 'canonical') { $bundle = $this->bundle(); - // A bundle-specific callback takes precedence over the generic one for the - // entity type. + // A bundle-specific callback takes precedence over the generic one for + // the entity type. $bundles = entity_get_bundles($this->entityType); if (isset($bundles[$bundle]['uri_callback'])) { $uri_callback = $bundles[$bundle]['uri_callback'];