19 declare(strict_types=1);
38 $this->
user = $DIC[
'ilUser'];
43 if (!(self::$instance instanceof
self)) {
44 self::$instance =
new self();
47 return self::$instance;
50 public function setSetting(
string $keyword,
string $value): void
52 $this->
settings->set($keyword, $value);
55 public function getSetting(
string $keyword, ?
string $default =
null): ?string
57 return $this->
settings->get($keyword, $default);
62 if (self::$isEnabled !==
null) {
63 return self::$isEnabled;
66 if ($this->
user->isAnonymous()) {
67 self::$isEnabled =
false;
71 self::$isEnabled = (bool) $this->
settings->get(
'enabled',
'0');
72 return self::$isEnabled;
setSetting(string $keyword, string $value)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getSetting(string $keyword, ?string $default=null)