Problem/Motivation
It would be wonderful to be able to access the toLink()
and toUrl()
entity methods directly inside a Twig template (like label()
, id()
, get*()
, and a few others).
Steps to reproduce
Try to generate a link to an entity directly in a Twig template.
Proposed resolution
Add EntityInterface::toLink() and EntityInterface::toUrl() to the allowed functions in the Twig sandbox policy.
Remaining tasks
- Rescope the issue and implementation.
- Make sure the test coverage is sufficient.
- Reviews / refinements.
- RTBC.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
TBD.
Original report by @Chi
I suppose this has no security implications.