[PP-1] Add $entity->uuid() methods to allowed methods list in Twig sandbox policy

Created on 13 February 2025, 2 months ago

Problem/Motivation

Similar to Add $entity->toUrl() and $entity->toLink() methods to allowed methods list in Twig sandbox policy Needs work it should be possible to be able to access the uuid() entity methods directly inside a Twig template. This especially makes sense in relation to #1726734: Replace serial entity IDs with UUIDs in URLs, or even globally? , Make it possible to link to an entity by UUID Active and their related issues.

Proposed resolution

Add EntityInterface::uuid() to the allowed functions in the Twig sandbox policy.

Remaining tasks

  1. Make sure the test coverage is sufficient.
  2. Reviews / refinements.
  3. RTBC.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

TBD.

Feature request
Status

Postponed

Version

11.1 🔥

Component

theme system

Created by

🇦🇹Austria mvonfrie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024