diff options
| author | 2023-12-15 23:04:29 +0100 | |
|---|---|---|
| committer | 2023-12-15 23:04:29 +0100 | |
| commit | 6bb45a87268157aab961a6a4a728d9a9bbe043b0 (patch) | |
| tree | d1c36638d5ee61e2e663d214d724a71f07a89354 /app/Models/UserConfiguration.php | |
| parent | a3ed8269132303eebc03d3e6df822f1f101fa95b (diff) | |
Add filter actions (auto mark read) at category and global levels (#5942)
* Add filter actions (auto mark read) at category level
fix https://github.com/FreshRSS/FreshRSS/issues/3497
* Add filter actions (auto mark read) at global level
fix https://github.com/FreshRSS/FreshRSS/issues/2788
* Fix feed category ID
* Minor comment
Diffstat (limited to 'app/Models/UserConfiguration.php')
| -rw-r--r-- | app/Models/UserConfiguration.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php index d75c76bcb..0aec3a05f 100644 --- a/app/Models/UserConfiguration.php +++ b/app/Models/UserConfiguration.php @@ -72,10 +72,31 @@ declare(strict_types=1); * @property array<string,mixed> $volatile */ final class FreshRSS_UserConfiguration extends Minz_Configuration { + use FreshRSS_FilterActionsTrait; /** @throws Minz_ConfigurationNamespaceException */ public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_UserConfiguration { parent::register('user', $config_filename, $default_filename); return parent::get('user'); } + + /** + * @phpstan-return ($key is non-empty-string ? mixed : array<string,mixed>) + * @return array<string,mixed>|mixed|null + */ + public function attributes(string $key = '') { + if ($key === '') { + return []; // Not implemented for user configuration + } else { + return parent::param($key, null); + } + } + + /** @param string|array<mixed>|bool|int|null $value Value, not HTML-encoded */ + public function _attributes(string $key, $value = null): void { + if ($key == '') { + return; // Not implemented for user configuration + } + parent::_param($key, $value); + } } |
