ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSamlSettings.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21final class ilSamlSettings
22{
23 private static ?self $instance = null;
24 private readonly ilSetting $settings;
25
26 private function __construct()
27 {
28 $this->settings = new ilSetting('auth_saml');
29 }
30
31 public static function getInstance(): self
32 {
33 if (null === self::$instance) {
34 self::$instance = new self();
35 }
36
37 return self::$instance;
38 }
39
40 public function isDisplayedOnLoginPage(): bool
41 {
42 return (bool) $this->settings->get('login_form', '0');
43 }
44
45 public function setLoginFormStatus(bool $displayed_on_login_page): void
46 {
47 $this->settings->set('login_form', (string) ((int) $displayed_on_login_page));
48 }
49}
setLoginFormStatus(bool $displayed_on_login_page)
readonly ilSetting $settings
ILIAS Setting Class.