diff options
| author | 2023-05-11 12:53:32 +0200 | |
|---|---|---|
| committer | 2023-05-11 12:53:32 +0200 | |
| commit | fe7d9bbcd68660a59b813346c236b61b25a51c80 (patch) | |
| tree | 95be837c2838659a3ea72974c9f9b18b1ee634ca /app/views/javascript | |
| parent | 2343f0ded14ac6970575c23e4de34e536241b623 (diff) | |
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
Diffstat (limited to 'app/views/javascript')
| -rw-r--r-- | app/views/javascript/actualize.phtml | 2 | ||||
| -rw-r--r-- | app/views/javascript/nbUnreadsPerFeed.phtml | 3 | ||||
| -rw-r--r-- | app/views/javascript/nonce.phtml | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml index 73890dd40..1a8af6e49 100644 --- a/app/views/javascript/actualize.phtml +++ b/app/views/javascript/actualize.phtml @@ -1,5 +1,5 @@ <?php -/** @var FreshRSS_View $this */ +/** @var FreshRSS_ViewJavascript $this */ $categories = []; foreach ($this->categories as $category) { diff --git a/app/views/javascript/nbUnreadsPerFeed.phtml b/app/views/javascript/nbUnreadsPerFeed.phtml index 261f2a179..4864b429a 100644 --- a/app/views/javascript/nbUnreadsPerFeed.phtml +++ b/app/views/javascript/nbUnreadsPerFeed.phtml @@ -1,5 +1,6 @@ -<?php /** @var FreshRSS_View $this */ ?> <?php +/** @var FreshRSS_ViewJavascript $this */ + $result = array( 'feeds' => array(), 'tags' => array(), diff --git a/app/views/javascript/nonce.phtml b/app/views/javascript/nonce.phtml index f565baa85..df1389f15 100644 --- a/app/views/javascript/nonce.phtml +++ b/app/views/javascript/nonce.phtml @@ -1,3 +1,3 @@ -<?php /** @var FreshRSS_View $this */ ?> <?php +/** @var FreshRSS_ViewJavascript $this */ echo json_encode(array('salt1' => $this->salt1, 'nonce' => $this->nonce)); |
