ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.DashboardSessionRepository.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\News\Dashboard;
22
27{
28 public const KEY_BASE = "news";
29
30 public function __construct()
31 {
32 }
33
34 public function setDashboardNewsPeriod(int $period): void
35 {
36 \ilSession::set(self::KEY_BASE . "dash_news_per", (string) $period);
37 }
38
39 public function getDashboardNewsPeriod(): int
40 {
41 if (\ilSession::has(self::KEY_BASE . "dash_news_per")) {
42 return (int) \ilSession::get(self::KEY_BASE . "dash_news_per");
43 }
44 return 0;
45 }
46}
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static has($a_var)