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;
54 public function setSetting(
string $keyword,
string $value): void
56 $this->
settings->set($keyword, $value);
64 public function getSetting(
string $keyword, ?
string $default = null): ?string
66 return $this->
settings->get($keyword, $default);
71 if (self::$isEnabled !== null) {
72 return self::$isEnabled;
75 if ($this->
user->isAnonymous()) {
76 self::$isEnabled =
false;
80 self::$isEnabled = (bool) $this->
settings->get(
'enabled',
'0');
81 return self::$isEnabled;
setSetting(string $keyword, string $value)
getSetting(string $keyword, ?string $default=null)