Problem/Motivation
Blocking #2343669: Remove _l() and _url()
Postponed on #2405551: Add a method to support UIs where users enter paths instead of route names and other valid use cases
no.... on #2417333: Add support for user-path: scheme to Url class
There are 4 _l() usages left.
#2404603: Add proper support for Url objects in FieldPluginBase::renderAsLink(), so we can remove EntityInterface::getSystemPath() will remove the renderAsLink (because it is tricky)
This removes the other remaining 3.
because #2417333: Add support for user-path: scheme to Url class use user-path
Proposed resolution
Use \Drupal::l()
Remaining tasks
User interface changes
No.
API changes
No.
Comment | File | Size | Author |
---|---|---|---|
#12 | 2368653.12.patch | 2.84 KB | YesCT |
#1 | 2368653-url_render-1.patch | 766 bytes | pcambra |
Comments
Comment #1
pcambraHere's a start. Had to use the Url fully qualified name because of the namespace conflict, maybe we should rename Drupal\views\Plugin\views\field\Url to UrlLink or something similar?
Comment #2
dawehnerI would rather say that we should pass along the url object, and the code which generates the URL takes care about that.
Note: This might be both relative and absolute URLs.
Comment #3
dawehnerBased upon my feedback.
Comment #4
YesCT CreditAttribution: YesCT commentedComment #5
webchickThis is a hard blocker to a critical issue at #2343669: Remove _l() and _url() so escalating to critical, too.
Comment #6
dawehnerMaybe #2405551: Add a method to support UIs where users enter paths instead of route names and other valid use cases is the right thing to use, if we don't know more.
Comment #7
pcambraMarking as postponed of #2405551: Add a method to support UIs where users enter paths instead of route names and other valid use cases
Comment #8
webchickTentatively tagging. This is a blocker for #2343669: Remove _l() and _url() and is currently blocked by at least two issues, both of which are only major. I'm wondering if based on the discussions that've been had at the sprint if it's possible to un-stick this one somehow, or at least clean-up its dependency chain.
Comment #9
YesCT CreditAttribution: YesCT commentedComment #10
YesCT CreditAttribution: YesCT commentedComment #11
dawehnerThe proper way is
user-path:$value
now.Comment #12
YesCT CreditAttribution: YesCT commentedThere are 4 _l() usages left.
#2404603: Add proper support for Url objects in FieldPluginBase::renderAsLink(), so we can remove EntityInterface::getSystemPath() will remove the renderAsLink (because it is tricky)
This removes the other remaining 3.
because #2417333: Add support for user-path: scheme to Url class use user-path
still postponed, but on #2417333: Add support for user-path: scheme to Url class
Comment #13
dawehnerWell yeah, but it would be still interesting to see whether things fail.
Comment #15
webchick#2417333: Add support for user-path: scheme to Url class just got committed, so this probably needs adjustment.
Comment #17
dawehnerI really hope that this just needs a retest.
Comment #18
dawehnerAwesome!!!!
Comment #19
webchickHell yes!
Committed and pushed to 8.0.x. Thanks!