From fe7d9bbcd68660a59b813346c236b61b25a51c80 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 11 May 2023 12:53:32 +0200 Subject: Typed view model classes (#5380) * Typed view model classes * Add ability to provide a typed view model class to a controller * Use `::class` instead of string for referring to classes * Examplified with `stats` and `javascript` controllers / views (more to do) * Also useful for extensions (my usecase today), which did not have the ability to define own view model attributes before. * Typo --- app/FreshRSS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/FreshRSS.php') diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 2e7ef6faa..12390b626 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -23,7 +23,7 @@ class FreshRSS extends Minz_FrontController { Minz_Session::init('FreshRSS'); } - Minz_ActionController::$viewType = 'FreshRSS_View'; + Minz_ActionController::$defaultViewType = FreshRSS_View::class; FreshRSS_Context::initSystem(); if (FreshRSS_Context::$system_conf == null) { -- cgit v1.2.3