mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-02-26 03:27:16 -05:00
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
This commit is contained in:
committed by
GitHub
parent
2343f0ded1
commit
fe7d9bbcd6
@@ -2,6 +2,13 @@
|
||||
|
||||
class FreshRSS_javascript_Controller extends FreshRSS_ActionController {
|
||||
|
||||
/** @var FreshRSS_ViewJavascript */
|
||||
protected $view;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct(FreshRSS_ViewJavascript::class);
|
||||
}
|
||||
|
||||
public function firstAction(): void {
|
||||
$this->view->_layout(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user