19 declare(strict_types=1);
41 protected \ilCtrlInterface
$ctrl;
43 protected \ILIAS\HTTP\Services
$http;
49 $this->
ctrl = $DIC->ctrl();
50 $this->wrapper = $DIC->http()->wrapper();
51 $this->
http = $DIC->http();
53 $this->global_screen = $DIC->globalScreen();
58 return $this->wrapper->cookie()->has(self::GS_MODE)
59 ? $this->wrapper->cookie()->retrieve(self::GS_MODE, $this->
refinery->to()->string())
70 $current_mode = $this->
getMode();
71 $new_mode = $current_mode === self::MODE1 ? self::MODE2 : self::MODE1;
72 $cookie_factory =
new CookieFactoryImpl();
73 $cookie = $cookie_factory->create(self::GS_MODE, $new_mode)
74 ->withExpires(time() + 3600);
75 $this->
http->cookieJar()->with($cookie);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initILIAS()
ilias initialisation
ILIAS HTTP Services $http
static http()
Fetches the global http state from ILIAS.
Class ModeToggle This is just for testing!!! And will be removed after.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...