Problem/Motivation
The Attribute classes are over architected and the composition is slow for performance. Also need a way to let type's define attributes.
Proposed resolution
- Move logic from AttributeArray() AttributeString() and AttributeBoolean() into Attribute() class and remove these extra classes.
- Setup a #type #pre_render hook for attributes: drupal_pre_render_attributes to build attributes for a type.
Remaining tasks
API changes
(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)
Related Issues
#1757550: [meta] Convert core PHPTemplate files and theme functions to Twig