Problem/Motivation
$url = \Drupal\Core\Url::fromRoute('<front>', [], ['atttributes' => ['class' => ['foo']]);
/**
* link(text, url, { 'class': ['bar'] });
*/
This should append a class, not replace the existing foo class.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2847611-4.patch | 1.98 KB | webflo |
Comments
Comment #2
dawehnerComment #3
dawehnerComment #5
webflo commentedComment #6
dan2k3k4 commentedRead through the code, good use of mergeOptions.
Seems to be all good from my side.
Comment #7
tim.plunkettCame to review this, already RTBC. +1 from me!
Comment #8
alexpottCommitted and pushed ba06831 to 8.4.x and 936ca9e to 8.3.x. Thanks!
I thought about the BC impact but the code change shows us that this is changing it to work as intended. And the worst that can happen is an additional classes are added.