City-of-Bloomington / OnBoard

An extensible system to keep track of boards & commissions details, the people appointed to those groups, any legislation they write, and the voting records of each committee member.
https://bloomington.in.gov/onboard
GNU Affero General Public License v3.0
16 stars 4 forks source link

Replace php templates with Twig #328

Open inghamn opened 1 year ago

inghamn commented 1 year ago

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.

inghamn commented 5 months 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.