[pp-1] Create generic Alter Attribute

Created on 22 April 2025, 3 days ago

Problem/Motivation

It might be convenient to have a standalone Alter Attribute.
See #3479141-66: Implement FormAlter and Alter attribute β†’

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

extension system

Created by

πŸ‡ΊπŸ‡ΈUnited States nicxvan

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

Comments & Activities

  • Issue created by @nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States dww
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    FWIW, per my comment in the previous issue, I'm not sure we should do this at all, despite being the person who originally suggested this.

    My idea was that we could/would use hierarchy for those attribute classes, so it would be FormAlter extends Alter extends Hook. However, this would complicate parsing of attribute classes by api.module, so we might not want to do that.

    And Alter on its own is not a hook, so that might be a bit confusing. I think we should probably only do it as an abstract class that you can't use directly *if* we want to support hierarchy like that.

    Otherwise we end up one more pattern that you have to look for. Right now, it's just #[Hook('form_FOO_alter')], the linked issue also means you have to look for #[FormAlter('FOO')], adding this means it could also be #[Alter('form_FOO')].

  • πŸ‡¨πŸ‡¦Canada Charlie ChX Negyesi 🍁Canada

    About api module, that's my bad, originally I said I do not know how it will fall out but api already has a "class hierarchy" option which we can reuse.

Production build 0.71.5 2024