Skip to content

Refactor info boxes - #121

Merged
froemken merged 27 commits into
mainfrom
refactorInfoBoxes
Jun 12, 2026
Merged

Refactor info boxes#121
froemken merged 27 commits into
mainfrom
refactorInfoBoxes

Conversation

@froemken

Copy link
Copy Markdown
Owner

No description provided.

froemken added 27 commits June 12, 2026 22:25
Revised connection and uptime messages for improved readability and
accuracy. Enhanced connection percentage calculation by adding safeguards
to prevent division by zero. Simplified phrasing for per-user connection limits.
Inject the StatusValues and Variables models directly via dependency
injection factory services instead of fetching them from database
repositories in runtime code.

Move constructor injection to the AbstractInfoBox base class so all
individual InfoBoxes inherit it. Decouple controllers and the page
rendering by introducing a new RenderInfoBoxFactory and removing the
obsolete Page model.
Declare the AbstractInfoBox base class and all its 27 subclasses as
readonly classes. Remove the obsolete getStatusValues and getVariables
getter methods from the base class, and replace all respective method
calls in the subclasses with direct property access.
Declare all concrete InfoBox subclasses, the ListElement DTO, and the
RenderInfoBoxFactory as final classes. This prevents inheritance and
enforces better encapsulation in the InfoBox system.
Remove the updateView method and ViewInterface dependencies from
AbstractInfoBox. Delegate view variable assignment and rendering to
RenderInfoBoxFactory. Additionally, rename the abstract renderBody
method to getBody in the base class and all subclasses.
Create InfoBoxInterface defining the TITLE constant and getBody. Update
AbstractInfoBox to implement this interface and remove its local TITLE
constant and getTitle method. Change all InfoBox subclasses to declare
TITLE as public. Read the constant dynamically in the factory.
Remove the abstract getBody method declaration from the AbstractInfoBox
base class. Since AbstractInfoBox implements InfoBoxInterface and all
concrete subclasses implement getBody, the explicit abstract method
declaration is redundant.
Remove the constructor declaration from AbstractInfoBox. Define a
local constructor in each of the 27 InfoBox subclasses to inject
StatusValues and Variables models directly. This removes the need to
call parent::__construct inside the subclasses.
Remove the AbstractInfoBox base class completely from the project.
Change all 27 InfoBox subclasses to directly implement the
InfoBoxInterface instead of inheriting from AbstractInfoBox.
Reorder the constants and constructor declarations inside all 27
InfoBox subclasses to follow standard member order guidelines:
traits, constants, constructor, then methods.
Run php-cs-fixer using the project's CGL configuration file to format
all modified controllers, InfoBox classes, and interface files to comply
with the TYPO3 coding guidelines.
Rename the typo3_13.yml workflow configuration to ci.yml in the
GitHub workflow directory to reflect general continuous integration
tasks.
Update the InfoBoxSystem.md specification file to describe the new
stateless architecture. Describe the InfoBoxInterface, the removal of
AbstractInfoBox, constructor DI autowiring, and RenderInfoBoxFactory.
@froemken
froemken merged commit cb8b490 into main Jun 12, 2026
3 checks passed
@froemken
froemken deleted the refactorInfoBoxes branch June 12, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant