Slowly, very slowly start OOPifying the render system

Created on 19 May 2025, about 1 month ago

Problem/Motivation

It's 2025. The render API suspiciously looks like form API when we added it 20 years ago.

Steps to reproduce

Proposed resolution

For now, add an object wrapper around the render array.

  1. ElementInfoManager::fromRenderArray() creates an ElementInterface plugin from a render array and stores a reference to said render array.
  2. Add __set and __get to RenderElementBase allow using the render properties as object properties.
  3. Add @property documentation on the render element plugins.
  4. Add a few child methods addChild, removeChild, getChildren to allow manipulating children of render element plugins.

Nothing more for now. Small moves.

Remaining tasks

  1. fromRenderArray is now not the best name. Or is it?
  2. Write tests.
  3. Credit andypost and kingdutch on the issue for their valuable insights in Slack.
  4. Convert all core and contrib to the new API and drop render arrays. (Should be an easy, simple followup.)

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Needs review

Version

11.0 πŸ”₯

Component

render system

Created by

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

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024