Problem/Motivation

In the file /core/lib/Drupal/Core/Entity/EntityInterface.php the returned values for the function urlInfo() have been updated, but the corresponding documentation has not been suitably updated to match.

Proposed resolution

Update the documentation.

Remaining tasks

Documentation needs to be updated.

User interface changes

No changes.

API changes

No changes.

Comments

paulh’s picture

StatusFileSize
new754 bytes

Updated documentation.

paulh’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: documentation-2199369.patch, failed testing.

jhodgdon’s picture

Title: Documentation not in sync with code » EntityInterface::urlInfo() docs not in sync with code

Thanks for filing this issue! I agree with the intent.

The patch, however, is not quite accurate:

+   *   An array containing 'route_name', 'route_parameters' and 'options' keys 
+   *   used to build the URI of the entity and matching the signature of url().
    */
   public function urlInfo($rel = 'canonical');

The signature of url() does not include route_name or route_parameters, so this part of the documentation needs an update.

larowlan’s picture

It matches the signature of \Drupal::url not url(), perhaps we should reference the \Drupal::url() method instead?

larowlan’s picture

+++ b/core/lib/Drupal/Core/Entity/EntityInterface.php
@@ -119,8 +119,8 @@ public function label();
+   *   An array containing 'route_name', 'route_parameters' and 'options' keys ¶

There is also whitespace on the end of 'keys', can that be removed during next patch re-roll?

paulh’s picture

StatusFileSize
new770 bytes

Updated the documentation to reference the correct method. Also stripped trailing white space.

paulh’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: documentation-2199369-1.patch, failed testing.

berdir’s picture

Version: 8.0-alpha8 » 8.x-dev
Status: Needs work » Needs review
berdir’s picture

7: documentation-2199369-1.patch queued for re-testing.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, seems fine to me!

larowlan’s picture

+1

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again everyone! Committed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.