Improve AnnotationBase to be more useful and encapsulate best practices

Created on 29 December 2013, about 11 years ago
Updated 13 March 2025, 2 days ago

Updated: Comment #0

Problem/Motivation

In #2005716: Promote EntityType to a domain object β†’ , we are adding an AnnotationBase class. This is due to the newly expanded AnnotationInterface.

The Plugin class, which is the one extended by 95% of core, returns an array.
This is fast and easy, but may turn out to be a mistake in the long run.

The current base class is abstract and does not implement the get() method.
We could make it concrete, and implement get() with a best-practices approach.

Proposed resolution

The new EntityType annotation class delegates to another class.
The annotation class could also just return itself.

Remaining tasks

Decide what is best practice, implement it.

User interface changes

N/A

API changes

API addition only.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

plugin system

Created by

πŸ‡ΊπŸ‡ΈUnited States tim.plunkett Philadelphia

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • πŸ‡ΊπŸ‡ΈUnited States tim.plunkett Philadelphia

    With the move to Attributes, I think this is safe to close

Production build 0.71.5 2024