Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Link.php/...
Enter a descriptive title (above) relating to public static function Link::createFromRoute, then describe the problem you have found:
In Link::createFromRoute
an array with the key of attributes
may be added to supply element attributes (class, title, etc). This is missing from the documented description of parameters, in the options section.
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff-2818011-5-13.txt | 442 bytes | rakesh.gectcr |
#13 | 2818011-13.patch | 1.55 KB | rakesh.gectcr |
#9 | 2818011-9.patch | 574 bytes | yashsharma01 |
#5 | interdiff-2-5.txt | 1.58 KB | shashikant_chauhan |
#5 | 2818011-5.patch | 1.49 KB | shashikant_chauhan |
Comments
Comment #2
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedadding patch.
Comment #3
Chi CreditAttribution: Chi commentedAs this parameter is passed directly to Url component we could just reference the method which accepts it (Url::fromUri) to avoid duplication.
The Url constructor does it this way.
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Url.php/f...
Comment #4
dalinI agree, let's not duplicate documentation.
Comment #5
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedAdded suggestion mentioned by Chi.
Comment #6
dalinComment #7
catchCould we explicitly say the $options param takes exactly the same structure? Otherwise I agree not duplicating is good.
Comment #8
yashsharma01 CreditAttribution: yashsharma01 as a volunteer commentedComment #9
yashsharma01 CreditAttribution: yashsharma01 as a volunteer commentedI have added comments and fixed @see documentation changes.
Comment #11
dalin@yashsharma01
I think we actually need both of those lines for the sentence to make sense.
Comment #12
rakesh.gectcrComment #13
rakesh.gectcrComment #14
rakesh.gectcrComment #15
rakesh.gectcrComment #16
rosschive CreditAttribution: rosschive commentedTaking a look as part of Global Sprint Weekend (Boston)...
Verifying that proposed changes in the interdiff are reflected in @rakesh.gectcr's submitted patch. Additionally, I launched simplytest.me sandbox site (with patch) without incident and site is stable.
Comment #17
webchickYay for less Druplication! ;)
Committed and pushed to 8.4.x, cherry-picked to 8.3.x and 8.2.x. Thanks!