Open inghamn opened 1 year ago
Controllers will now need to return Views that render twig files. Previously, there was a global $template variable that all controllers shoved blocks into. Now, we need a seperate View class for each screen so it can declare which twig file to render and prepare all the data needed for each template.
Since I have to modify all existing Controller methods anyway, it makes sense to split the old Controller methods out into single Invokable Controllers now and update the routing to point to each invokable controller.
Amajor part of modernizing the application is to use a templating engine. Twig is still the preferred templating language, and we have impleented it in other projects.
We need to replace all the current templates and blocks with twig templates.