Closed (won't fix)
Project:
Twig Tweak
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2020 at 14:03 UTC
Updated:
25 Apr 2020 at 05:24 UTC
Jump to comment: Most recent
Comments
Comment #2
chi commentedIt's not clear what you mean.
drupal_url()does accept Url options.Comment #3
lalop commentedI mean
drupal_urlcould accept an Url as first paramComment #4
chi commentedIt's clear now though the case looks too specific.
Comment #5
chi commentedI think modifying existing URLs is out of scope of
drupal_urlfunction. The URL with proper options can be generated manually with coreurlfunction. Once #2907810: [PP-1] Add $entity->toUrl() and $entity->toLink() methods to allowed methods list in Twig sandbox policy lands it will much easier to obtain entity URLs in Twig.Thanks.