Return an Attribute object instead of an array

Created on 3 July 2023, over 1 year ago
Updated 4 July 2023, over 1 year ago

Problem/Motivation

Handling the link field attributes in twig, we saw that, in constrast to most other attributes implementations, the module seems to return the link attributes as array and not as Attribute object.

Subsequent methods like twig's {{ link() }} method also allows using an array (3rd parameter), but it feels inconsitent to do so and has drawbacks, in contrast to the unified Attribute object, for example when adding classes, etc.

I guess that other modules and hopefully core already use Attribute objects in such cases?

Steps to reproduce

Proposed resolution

Return an Attribute object instead of a key-value array.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

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

Comments & Activities

Production build 0.71.5 2024